VMS Help  —  EXCHANGE
    Invokes the Exchange utility (EXCHANGE), which manipulates mass
    storage volumes that are written in formats other than those
    normally recognized by the operating system.

    EXCHANGE allows you to perform any of the following tasks:

    o  Create foreign volumes.

    o  Transfer files to and from the volume.

    o  List directories of the volume.

    For block-addressable devices, such as RT-11 disks, EXCHANGE
    performs additional operations such as renaming and deleting
    files. EXCHANGE can also manipulate Files-11 files that are
    images of foreign volumes; these files are called virtual
    devices.

    To transfer files to or from operating systems that do not
    support OpenVMS file organizations, use /NETWORK.

    Format

      EXCHANGE  [subcommand] [filespec] [filespec]

1  –  Description

    You can use EXCHANGE in two ways. You can work interactively
    (within the utility) by entering "EXCHANGE" at the DCL prompt.
    This invokes the utility, which responds with the EXCHANGE>
    prompt. You can then enter any EXCHANGE command. You must invoke
    the utility and use it interactively if you want to execute
    more than one EXCHANGE command. However, you can enter a single
    EXCHANGE command at DCL level. For example, the following command
    entered at DCL level lists the directory of a foreign volume:

    $ EXCHANGE DIRECTORY DMA1:/VOLUME_FORMAT=RT11

    When you use EXCHANGE at the DCL level, the utility returns you
    to the DCL prompt after it completes its task. If you are using
    EXCHANGE interactively, you can return to DCL at any time by
    typing EXIT or CTRL/Z.

    You can direct output from EXCHANGE operations in several ways.
    The command qualifier /[NO]MESSAGE allows you to control the
    default display of information from EXCHANGE MOUNT, INITIALIZE,
    and DISMOUNT operations. When you use the EXCHANGE commands
    COPY, DELETE, RENAME, or TYPE, include the /LOG qualifier to send
    information about the files being processed to SYS$OUTPUT. When
    you use the EXCHANGE command DIRECTORY, use the /OUTPUT[=file-
    spec] qualifier to direct the output to a specified file. If
    you specify the /OUTPUT qualifier without a file specification,
    the output is directed to SYS$OUTPUT. To send the output to a
    printer, use the /PRINTER qualifier with the DIRECTORY command.

2  –  Parameters

 subcommand

    Defines the specific operation to be performed.

 filespec

    Specifies the device name, directory, and file name for the
    EXCHANGE input or output device. It has the following general
    form:

    device:[directory]filename.filetype;version

    device:    The device name can be either a standard OpenVMS
               device name of the form ddcu: or a logical name that
               translates to an OpenVMS device name. If the device
               field is omitted for a reference, the current default
               device is assumed. When a virtual device is mounted, a
               name is created for the virtual device and is used as
               the device name in subsequent EXCHANGE commands.

    [directory]The syntax of the directory subfield is volume
               specific.

    filename   The name field file specification for an input or
               output file. The exact format allowed for the file
               name is dependent on the volume format qualifier used.

    filetype   The extension field of the file specification.

    version    The version number of the file, if supported by the
               volume type.

3  –  COPY

    Transfers a file or files from an input volume to an output
    volume. You can use the COPY command to do any of the following:

    o  Copy a file from a foreign volume to a native volume

    o  Copy a file from a native volume to a foreign volume

    o  Copy a file from one foreign volume to another foreign volume

    o  Convert the format of the file during the transfer

    o  Copy groups of files from volume to volume

    o  Give the output file a different name from the input file

    Format

      COPY  input-file-spec[, . . . ] output-file-spec

3.1  –  Parameters

 input-file-spec[, . . . ]

    Specifies the names of one or more input files to be copied. If
    you specify more than one input file, separate them with commas
    or plus signs. The syntax for input file names depends on the
    volume format option. You can specify standard OpenVMS wildcards
    in both Files-11 and foreign file names. COPY supports wildcard
    directories for Files-11 and DOS-11 input.

                                   NOTE

       The EXCHANGE COPY command does not process search lists as
       input files. If you specify a search list as input to the
       COPY command, only the first item is processed. For example,
       suppose you issue the following commands:

       $ DEFINE search_list [directory_1], [directory_2]
       $ EXCHANGE COPY search_list:*.* [directory_3]

       The EXCHANGE command does not copy anything from directory_
       2.

 output-file-spec

    Specifies the name of the output file, directory, or device
    to which the input files are to be copied. If the input is a
    single file, you can specify an explicit output name (which is
    equivalent to a rename on a copy operation). If the input is more
    than one file, the output specifier must be one of the following:

    o  Wildcards (*, *.* or *.*;*) specifying current default device
       and directory

    o  An explicit device and/or directory for Files-11 output, such
       as BB:[EXCHANGE.TMP], with or without wildcards for the file
       name

    o  An explicit device for RT-11 as in DLA2:/VOLUME=RT11

    o  An explicit device or directory for DOS-11 output, such as
       TAPE:/VOLUME=DOS11 or TAPE:[11,132]/VOLUME=DOS11

    The output file names are constructed according to rules
    implied by the input and output volume qualifiers. COPY does
    not concatenate multiple input files into a single output file.
    Wildcard directories are not permitted. The syntax for input file
    names depends on the volume format option.

    You must specify at least one field in the output file
    specification; COPY replaces missing fields with the
    corresponding field of the related input file specification.
    If the input file has no corresponding field, COPY substitutes
    null text fields and maximizes version numbers.

    The UIC of the output file is the UIC of the current process.
    For DOS-11 output in UIC format, EXCHANGE uses the current
    default directory; otherwise, it uses the current process UIC
    as a directory. You can specify an alternate directory for DOS-11
    output in the command.

3.2  –  Description

    COPY transfers a file or files from an input volume to an output
    volume.

    You can create multiple output files by specifying multiple input
    files. When multiple output files are created, the corresponding
    field from each input file is used in the output file name.

    If you do not specify a version number for Files-11 output, COPY
    applies a version number as follows:

    o  The same version number as that of the input file, if the
       input volume structure supports version numbers and no file
       exists with the same name and type

    o  A version number that is one greater than the highest version
       number of an existing file with the same file name and file
       type

    o  Version 1, if neither of the above applies

    If you use an asterisk (*)  wildcard character to specify the
    output file version number, COPY uses the version numbers of the
    associated input files (if any) as the version numbers of the
    output files.

    Note that ANSI-formatted magnetic tapes do not handle version
    numbers in the same manner as disks.

    EXCHANGE might reformat files during the copy operation. The
    defaults for reformatting are dependent on the record and volume
    format qualifiers that are attached to both the input and output
    file specifications, as well as the type fields of the file
    specifications.

    The COPY command does not copy a file with the SYS type unless
    you specify the /SYSTEM qualifier. EXCHANGE displays a message if
    it passes over one or more SYS files during a copy operation.

    EXCHANGE does not copy files with the type BAD if the file
    specification contains wildcards. EXCHANGE does not display a
    message when it passes over one or more BAD files during a copy
    operation. Therefore, to copy a file with the type BAD, specify
    the file name explicitly instead of using wildcards.

3.3  –  Qualifiers

3.3.1    /ALLOCATION

       /ALLOCATION=n

    Forces the initial allocation of the output file to the number
    of 512-byte blocks that you specified as n. The /ALLOCATION
    qualifier is valid only for Files-11 and RT-11 output files.

    By default, COPY determines the initial allocation of the output
    file by the size of the input file. Typically, /ALLOCATION is
    needed only when you are creating a contiguous file on Files-11
    (using /BEST_TRY_CONTIGUOUS or /CONTIGUOUS), when the input file
    is on magnetic tape, or when you want additional space at the end
    of the file.

    If you specify /ALLOCATION, the file's allocated size does not
    change, unless you also specify /TRUNCATE. When you are unsure of
    the output size, you might want to specify both /ALLOCATION and
    /TRUNCATE.

3.3.2    /BEST_TRY_CONTIGUOUS

       /BEST_TRY_CONTIGUOUS
       /NOBEST_TRY_CONTIGUOUS

    Indicates whether the Files-11 output file is to be allocated
    contiguously on a "best effort" basis; that is, whether EXCHANGE
    will attempt to place the file on consecutive physical disk
    blocks. If insufficient contiguous space is available, the file
    occupies the largest available contiguous space plus additional
    extents as necessary for the rest of the allocation. You can
    apply this qualifier only to a Files-11 output file.

    The /BEST_TRY_CONTIGUOUS qualifier has no effect when you copy
    files to magnetic tape volumes. When you would like a file from a
    magnetic tape to be copied contiguously, use both the /ALLOCATION
    and the /BEST_TRY_CONTIGUOUS qualifiers, because the size of
    the file on magnetic tape cannot be determined until after it
    is copied to the disk. If you do not know the exact size of the
    file, overestimate the size and specify /TRUNCATE (along with
    /ALLOCATION and /BEST_TRY_CONTIGUOUS) to avoid wasted space.

    The default is /NOBEST_TRY_CONTIGUOUS.

3.3.3    /BOOT

       /BOOT[=nn]

    Copies bootstrap information from a monitor and the handler files
    to blocks 0 and 2 through 5 of an RT-11 volume, permitting you to
    use that volume as a system volume. The COPY/BOOT operation does
    not create any files on the volume; it is intended only to create
    bootable RT-11 systems.

    The /BOOT qualifier implies /VOLUME_FORMAT=RT11 for both input
    and output specifications. The output device can be omitted, as
    it is assumed to be identical to the input device. You cannot
    combine the /BOOT qualifier with qualifiers other than /LOG.
    The COPY/BOOT command requires that both the input and output
    devices be the same volume or virtual device. The file name of
    the desired monitor must be specified as the input specification.

    RT-11 Version 1.0 through Version 3.0 monitors had the system
    device handler linked into the monitor image. For Version 4.0
    of RT-11, the system device handler uses the standard device
    handler, and the COPY/BOOT command must dynamically link the
    handler into the bootstrap area. COPY/BOOT finds the default
    handler for the specific device type and merges the handler with
    the monitor as it is copied to the boot area.

    You can use the two-letter argument nn to override the default
    system device handler. The most frequent use of this option
    occurs when a diskette is mounted in an RX02 drive, and you want
    to create a diskette bootable from an RX01 drive. (The diskette
    must be single density.) The default handler for the RX02 is
    DY.SYS, and the handler for the RX01 is DX.SYS; therefore, you
    would use the command COPY/BOOT=DX to create the bootable RX01
    system diskette. Do not specify /BOOT=nn for Version 3.0 RT-11
    and earlier systems; instead, choose the monitor file DYMNxx.SYS
    or DXMNxx.SYS as the source file.

3.3.4    /CARRIAGE_CONTROL

       /CARRIAGE_CONTROL=option

    Defines the carriage control attributes of a file, as well as
    other attributes of the records. The carriage control options
    are: CARRIAGE_RETURN, which implies carriage return/line-feed
    control; FORTRAN, which indicates that the first character
    of each record is to be interpreted as the carriage control
    specifier; and NONE, which indicates that carriage control is
    not implied.

    The default is /CARRIAGE_CONTROL=CARRIAGE_RETURN.

3.3.5    /CONTIGUOUS

       /CONTIGUOUS
       /NOCONTIGUOUS

    Indicates whether the copied file is to be contiguous; that is,
    stored on consecutive physical blocks on an output disk volume.
    The /CONTIGUOUS qualifier is valid only for Files-11 output
    files.

    The /CONTIGUOUS qualifier has no effect when you copy files to
    magnetic tape volumes. When you would like a file from a magnetic
    tape to be copied contiguously, use both the /ALLOCATION and
    /CONTIGUOUS qualifiers because the size of the file on magnetic
    tape cannot be determined until after it is copied to the disk.
    If you do not know the exact size of the file, overestimate the
    size and specify the /TRUNCATE qualifier (along with /ALLOCATION
    and /CONTIGUOUS) to avoid wasted space.

    The default is /NOCONTIGUOUS.

3.3.6    /DELETE

       /DELETE
       /NODELETE

    Controls whether COPY deletes existing files of the same name
    during the copy operation. This qualifier is valid for RT-
    11 output only; it is equivalent to the RT-11 COPY command
    qualifier /REPLACE. In fact, you can use the EXCHANGE COPY
    command qualifier /REPLACE to control file deletion, although
    its function differs from that of /DELETE (see the description of
    the /REPLACE qualifier for details on its function).

    If you want a message displayed when you delete a file, include
    the /LOG qualifier in your command. To prevent automatic file
    deletion, use /NODELETE.

    The default is /DELETE. Files with the same name as the output
    file name are deleted after the new file has been copied.

3.3.7    /EXTENSION

       /EXTENSION=n

    Specifies the number of blocks to be added to the output file
    each time the file is extended. This qualifier is valid for
    Files-11 output files only.

    EXCHANGE determines the default extension according to the
    following hierarchy:

    1. An explicit value specified on the /EXTENSION qualifier

    2. The current process default extension value set by the command
       SET RMS_DEFAULT

    3. The current system default extension value set at system
       generation or with the SET RMS_DEFAULT/SYSTEM command

    Use the /EXTENSION qualifier to set an extension quantity with
    magnetic tape input; EXCHANGE preallocates a file of the correct
    size when the input is on a directory-structured-device.

3.3.8    /LOG

       /LOG
       /NOLOG

    Controls whether the EXCHANGE command COPY displays the file
    specifications of each file copied. If you specify /LOG, the
    system displays the following data for each copy operation:
    the file specifications of the input and output files, and the
    number of blocks or the number of records copied (depending on
    whether the file is copied on a block-by-block or record-by-
    record basis). The default is /NOLOG.

3.3.9    /PROTECT

       /PROTECT
       /NOPROTECT

    Determines whether protection is set for an RT-11 output file.
    The owner UIC of the output file is the UIC of the current
    process. This qualifier is not valid for Files-11 or DOS-11
    output files. Protection attributes for Files-11 output are taken
    from the current process default protection.

    EXCHANGE does not attempt to transfer protection attributes from
    the input file to the output file, because protection mechanisms
    of various operating systems do not readily translate to one
    another.

    The default is /NOPROTECT.

3.3.10    /RECORD_FORMAT

       /RECORD_FORMAT=(option[, . . . ])

    Defines the internal record structure of a file, as well as other
    attributes of the records.

3.3.11    /REPLACE

       /REPLACE
       /NOREPLACE

    Requests that if an RT-11 output file already exists with the
    same file specification as that entered for the output file, the
    existing file is to be deleted before the copy proceeds. COPY
    allocates new space for the output file. The /REPLACE qualifier
    is valid for RT-11 output only; it is equivalent to the RT-11
    COPY command qualifier /PREDELETE.

    By default, COPY creates the new file first and then, after the
    copy operation is done, deletes the previous file. However, when
    you use /REPLACE, COPY deletes the previous file before it copies
    the new file. This can be a problem if the input file has been
    corrupted because the previous version of the file will have been
    deleted. Therefore, you should use /REPLACE only when there is
    insufficient room for two copies of the file.

3.3.12    /REWIND

       /REWIND
       /NOREWIND

    Determines whether a DOS-11 input magnetic tape reel logically
    rewinds to the beginning-of-tape mark (BOT) before EXCHANGE
    searches for the file name specified in the input specifier. This
    qualifier is valid for DOS-11 magnetic tape only. The default is
    /NOREWIND.

    Use the /REWIND qualifier when you want COPY to search for a file
    from the logical beginning of the magnetic tape, instead of from
    the current physical position of the tape.

3.3.13    /START_BLOCK

       /START_BLOCK=[n]

    For RT-11 volumes, specifies the logical block number where the
    file is to be placed. This qualifier is especially useful with
    TU58 tape cassettes, because performance can be significantly
    enhanced by careful placement of files.

3.3.14    /SYSTEM

       /SYSTEM
       /NOSYSTEM

    Controls whether the COPY command copies files that have the file
    type SYS. Files with a file type of SYS are usually necessary for
    the operation of an RT-11 system. Only RT-11 volumes handle SYS
    files in this manner.

    The default is /NOSYSTEM; the COPY command does not copy an
    RT-11 file with the type SYS, whether matched by a wildcard
    specification or explicitly named. EXCHANGE displays a message
    whenever it skips over a SYS file during a copy operation.

3.3.15    /TRANSFER_MODE

       /TRANSFER_MODE=option

    Specifies the I/O method to be used in a transfer. This qualifier
    is useful for all volume formats.

    Option   Function

    AUTO     Select BLOCK transfer for efficiency if possible
    BLOCK    Transfer block by block without looking at records
    RECORD   Transfer record by record

    The default is the AUTOMATIC transfer mode. In AUTOMATIC mode,
    EXCHANGE attempts to use a BLOCK transfer whenever possible.
    BLOCK transfers are possible between RT-11 volumes or between
    RT-11 and DOS-11 volumes, since the internal file structures are
    identical. AUTOMATIC does not use the BLOCK transfer if either
    file specification contains a /RECORD_FORMAT qualifier.

    A BLOCK transfer moves data between devices. Since no
    interpretation is done on the data, BLOCK transfers are more
    efficient than RECORD transfers. The block sizes on both devices
    must be identical. Both input and output must be in BLOCK format.
    Specifying BLOCK on one parameter implies BLOCK for the other
    file or device specification.

    A BLOCK transfer produces an exact copy of the file. If the
    output device is Files-11, the file will be a sequential
    file with fixed-length 512-byte records. This feature is used
    primarily to avoid any interpretation of the data during the
    transfer. If the Files-11 file is a sequential file with 512-byte
    fixed-length records, there is no difference between a /TRANSFER_
    MODE=BLOCK transfer and a /RECORD=FIXED=512 transfer.

    A RECORD transfer moves the data record by record. A RECORD
    transfer requires more time than a BLOCK transfer, but it must
    be used if the input and output record structures differ.

    When the /LOG qualifier is used in a COPY command, EXCHANGE
    displays the size of the file that was transferred. If BLOCK
    mode was used, the message gives the file size as the number of
    blocks transferred. If RECORD mode was used, the message displays
    the number of records.

3.3.16    /TRUNCATE

       /TRUNCATE
       /NOTRUNCATE

    Controls whether COPY truncates an output file at the end-of-
    file when copying it. The default is /NOTRUNCATE; COPY uses the
    allocation of the input file to determine the size of the output
    file.

3.3.17    /VOLUME_FORMAT

       /VOLUME_FORMAT=option

    Defines the physical format of the volume to be processed. The
    default format qualifier is dependent on the device type.

    If used, volume format qualifiers must be attached to one or
    both of the file specification parameters; you cannot attach them
    directly to the command. A volume format qualifier determines the
    format of the file name and directory specifications, and often
    implies certain defaults.

3.4  –  Examples

    1.EXCHANGE> COPY TEST.DAT DYA0:NEWTST.DAT/VOLUME_FORMAT=RT11

      The command in this example copies the contents of the file
      TEST.DAT from the default disk and directory into a file named
      NEWTST.DAT on an RT-11 diskette (mounted on DYA0). If a file
      named NEWTST.DAT already exists, the COPY command replaces it.
      The record formats are variable length on the Files-11 input
      and ASCII stream on the RT-11 output.

    2.EXCHANGE> COPY/LOG  TEST.DAT  DYA0:NEWTST.DAT
      %EXCHANGE-S-DELETEPREV, previous copy of DYA0:NEWTST.DAT deleted
      %EXCHANGE-S-COPIED, WRKD$:[FRED]TEST.DAT;5
                   copied to  DYA0:NEWTST.DAT, 93 records

      The command in this example is the same as in the preceding
      example, except that the /LOG qualifier is included so that
      the actions of the command are displayed. The /VOLUME_FORMAT
      qualifier is omitted; EXCHANGE defaults to RT-11 format for the
      foreign mounted diskette. Since a file named NEWTST.DAT already
      exists on the diskette (from the command in the previous
      example), the first copy of the file is deleted after the
      second copy is successfully transferred.

    3.EXCHANGE> COPY/LOG  LARGE.DAT  DYA0:/VOLUME_FORMAT=RT11
      %EXCHANGE-S-DELETEPREV, previous copy of _DYA0:LARGE.DAT deleted
      %EXCHANGE-W-RTOUTEOF, end-of-file on output _DYA0:LARGE.DAT,
      insufficient space on volume
      %EXCHANGE-I-PARTCOPIED, WRKD$:[FRED]LARGE.DAT;9 partially copied to
      _DYA0:LARGE.DAT, 1670 records

      EXCHANGE> COPY/LOG/REPLACE  LARGE.DAT  DYA0:/VOLUME_FORMAT=RT11
      %EXCHANGE-S-DELETEPREV, previous copy of _DYA0:LARGE.DAT deleted
      %EXCHANGE-S-COPIED, WRKD$:[FRED]LARGE.DAT;9 copied to
      _DYA0:LARGE.DAT, 3288 records

      The first command in this example fails because there is
      insufficient space on DYA0 for EXCHANGE to do a normal copy
      (that is, to copy the file into a temporary file on DYA0,
      delete the existing file of the same name, and then rename
      the temporary file).

      The second command in this example includes the /REPLACE
      qualifier, which directs COPY to delete an existing version of
      the output file before copying the new file. The first message
      generated by this command indicates that EXCHANGE has deleted
      an existing file. The second message indicates that the copy
      operation has successfully completed.

    4.EXCHANGE> COPY MTA0:[11,132]*.COM/VOLUME_FORMAT=DOS11 [FRED.TEMP]

      The command in this example copies all files with the file type
      COM owned by UIC [11,132] to the subdirectory [FRED.TEMP]. The
      default DOS-11 record format is STREAM. The default Files-11
      record format is VARIABLE.

    5.EXCHANGE> COPY/BOOT DYA0:RT11SJ.SYS DYA0:

      The COPY/BOOT command in this example makes the diskette
      mounted on the RX02 drive DYA0 a bootable RT-11 system.
      Bootstrap information is written to the volume using the RT-11
      single job monitor RT11SJ.SYS and the system device handler
      DY.SYS. The diskette can be formatted in single or double
      density.

    6.EXCHANGE> COPY/BOOT=DX DYA0:RT11SJ.SYS DYA0:

      As in the previous example, the COPY/BOOT command in this
      example makes the diskette mounted on the RX02 drive DYA0 a
      bootable RT-11 system. In this example, however, the system
      device handler is DX.SYS, the RX01 diskette handler. The
      diskette must be formatted in single density in order to boot
      on the RT-11 system.

    7.EXCHANGE> COPY/BOOT CSA1:CONSOL.SYS

      The command in this example writes bootstrap information on the
      console storage device on a VAX processor.

    8.EXCHANGE> COPY DMA0:FROG.DAT/VOLUME_FORMAT=RT11-
      _EXCHANGE> /RECORD=STREAM FROG4JUN.DAT/RECORD=(FIXED=80,PAD=" ")

      The command in this example copies an ASCII stream file (the
      default) from an RT-11 volume to the current default device and
      directory. The output contains fixed-length records that are
      padded to 80 bytes with the space character.

4  –  DELETE

    Deletes one or more files from a foreign block-addressable mass
    storage volume. EXCHANGE does not delete files from Files-11
    volumes; the DELETE command is supported only on RT-11 volumes.

    Format

      DELETE  file-spec[, . . . ]

4.1  –  Parameter

 file-spec[, . . . ]

    Specifies the names of one or more files to be deleted. You can
    specify wildcard characters in any of the file specification
    fields.

    To delete more than one file, separate the file specifications
    with commas or plus signs.

    The DELETE command does not delete a file with the SYS type
    unless you specify the /SYSTEM qualifier. EXCHANGE displays a
    message if it passes over one or more SYS files during a delete
    operation.

    EXCHANGE does not delete files with the type BAD if the file
    specification contains wildcards. When this happens, you will not
    receive a warning. Therefore, to delete files with the type BAD,
    enter their file specifications explicitly.

4.2  –  Qualifiers

4.2.1    /LOG

       /LOG
       /NOLOG

    Controls whether the DELETE command displays the file
    specification of each deleted file. The default is /NOLOG.

4.2.2    /SYSTEM

       /SYSTEM
       /NOSYSTEM

    Controls whether the DELETE command deletes files with the file
    type .SYS. Files with the type .SYS are usually necessary for
    the operation of an RT-11 system. Only RT-11 volumes handle .SYS
    files in this manner.

    The default is /NOSYSTEM; the DELETE command does not delete
    an RT-11 file with the .SYS type, whether matched by a wildcard
    specification or explicitly named. EXCHANGE displays a message
    whenever it skips a SYS file during a delete operation.

4.2.3    /VOLUME_FORMAT

       /VOLUME_FORMAT=option

    Defines the physical format of the volume to be processed. RT-
    11 volumes are the only volumes on which DELETE is currently
    supported.

4.3  –  Examples

    1.EXCHANGE> DELETE DMA0:COMMON.SUM/VOLUME_FORMAT=RT11

      The command in this example deletes the file COMMON.SUM from
      the RT-11 device DMA0.

    2.EXCHANGE> DELETE DXA0:*.OLD

      The command in this example deletes all files with the file
      type OLD from the diskette.

    3.EXCHANGE> MOUNT /VIRTUAL TEST: TEST.DSK/VOLUME_FORMAT=RT11

      EXCHANGE> DELETE TEST:ALPHA.TXT,BETA.TXT

      The command in this example deletes the files ALPHA.TXT and
      BETA.TXT from the virtual device file TEST.DSK.

5  –  DIRECTORY

    Provides a list of files or information about a file or group of
    files. The files must reside on a foreign volume; EXCHANGE does
    not list directories of Files-11 volumes.

    Format

      DIRECTORY  [file-spec[, . . . ]]

5.1  –  Parameters

 file-spec[, . . . ]

    Specifies one or more files to be listed. The /VOLUME_FORMAT
    qualifier determines the syntax of a file specification.

    To specify more than one file, separate the file specifications
    with either commas or plus signs. You can use wildcard characters
    in the directory specification, file name, file type, or version
    number fields of a file specification.

5.2  –  Description

    The output of the DIRECTORY command depends on the volume format
    and on certain formatting qualifiers and defaults. The following
    are the formatting qualifiers:

    /ALL       /BLOCKS     /BRIEF     /COLUMNS    /DATE
    /FULL      /OCTAL      /OWNER     /SIZE

    The files that are listed always appear in the order in which
    they appear in the volume directory or the order in which they
    reside on a magnetic tape.

5.3  –  Qualifiers

5.3.1    /ALL

       /ALL
       /NOALL

    Lists all deleted or unused files on an RT-11 volume, in addition
    to other files selected by the command. For example, the
    following command lists all MACRO source files, in addition to
    deleted and unused files:

    EXCHANGE> DIRECTORY DMA0:*.MAC/ALL

5.3.2    /BADBLOCKS

       /BADBLOCKS
       /NOBADBLOCKS

    Scans the volume to find any blocks that return read errors. The
    data on the volume is not modified. If a bad block replacement
    table is present, the contents of the table are displayed. This
    is valid for RT-11 volumes only.

5.3.3    /BLOCKS

       /BLOCKS
       /NOBLOCKS

    Lists the starting block number of the file. This qualifier is
    valid only for directories of RT-11 devices. The first block of
    the device is block number 0. The default is /NOBLOCKS.

5.3.4    /BRIEF

       /BRIEF
       /NOBRIEF

    Includes only the file name of each file to be listed. Specifying
    the /BRIEF qualifier is equivalent to specifying /NODATE/NOSIZE.
    The default is /BRIEF.

5.3.5    /COLUMNS

       /COLUMNS=n

    Lists the files, using the specified number of columns on each
    line of the display. This qualifier is used in conjunction with
    the /BRIEF qualifier (either explicitly or by default). The
    default number of columns is dependent on the volume format and
    the information requested. The DIRECTORY command attempts to use
    as many columns as possible. If you request too many columns,
    DIRECTORY displays a message and reduces the number of columns to
    the number that fit on the listing.

5.3.6    /DATE

       /DATE
       /NODATE

    Includes the date for each file listed. If you omit this
    qualifier, the default is /DATE.

5.3.7    /DELETED

       /DELETED
       /NODELETED

    Lists a directory of files that have been deleted from an RT-11
    device, but whose file name information has not been destroyed.
    The listing includes the file names, types, sizes, creation
    dates, and starting block numbers (in decimal, unless you also
    specify the /OCTAL qualifier) of the deleted files. The /DELETED
    qualifier is valid only with block-addressable volumes in RT-11
    format. The default is /NODELETED.

5.3.8    /FREE

       /FREE
       /NOFREE

    Includes unused areas in the directory listing. The /FREE
    qualifier is valid only with RT-11 formatted volumes.

5.3.9    /FULL

    Lists all the available information for each file. The format
    of the listing depends on the format of the volume. The /FULL
    qualifier overrides the default brief listing format.

5.3.10    /OCTAL

       /OCTAL
       /NOOCTAL

    Controls whether numeric information is displayed in decimal or
    octal format. The default is /NOOCTAL; numbers are displayed in
    decimal radix. Dates are always displayed in decimal format.

5.3.11    /OUTPUT

       /OUTPUT[=file-spec]

    Writes the DIRECTORY output to a specified file, rather than
    to the current SYS$OUTPUT device. If you specify the /OUTPUT
    qualifier without a file specification, the output is directed to
    SYS$OUTPUT. If you omit the file type in the file specification,
    the default file type is .LIS. If you specify a file type
    and omit the file name, the default file name is EXCHDIRE. No
    wildcard characters are allowed in the file specification.

5.3.12    /OWNER

    Displays information about the owner of a volume and the files on
    the volume. For RT-11, the volume owner is shown. For DOS-11, the
    UIC of the file owner is shown.

5.3.13    /PRINTER

    Queues the command output for printing under the name specified
    by the /OUTPUT qualifier. If you specify /PRINTER without
    the /OUTPUT qualifier, the output is directed to a file named
    EXCHDIRE.LIS, which is spooled for printing and then deleted.

5.3.14    /SIZE

       /SIZE
       /NOSIZE

    Displays the file size in blocks for each file listed. The
    default is /SIZE.

5.3.15    /SUMMARY

       /SUMMARY
       /NOSUMMARY

    Lists a summary of the usage of the directory segments for an
    RT-11 volume. If a bad block replacement table is present, the
    contents of the table are displayed.

5.3.16    /VOLUME_FORMAT

       /VOLUME_FORMAT=option

    Defines the physical format of the volume to be processed. The
    default format is dependent on the device type.

    The EXCHANGE command DIRECTORY is not valid for Files-11 devices.

5.4  –  Examples

    1.EXCHANGE> DIRECTORY DLA2:.OBJ/VOLUME_FORMAT=RT11/FULL

      The command in this example lists all files with the type .OBJ
      on the RT-11 volume mounted on DLA2. The /FULL qualifier causes
      the file sizes and dates to be listed along with the names.

    2.EXCHANGE> DIRECTORY MFA0:/VOLUME_FORMAT=DOS11

      The command in this example lists all files on the DOS-11
      magnetic tape mounted on MFA0. The magnetic tape is rewound
      before the files are listed.

6  –  DISMOUNT

    Releases a volume previously accessed by the EXCHANGE command
    MOUNT.

    Format

      DISMOUNT  device-name[:]

6.1  –  Parameters

 device-name[:]

    Specifies the name of the device to be dismounted. You can
    specify a physical device name or a logical name assigned to
    a physical device name. If you omit a controller designation
    or a unit number, the defaults are controller A and unit 0,
    respectively. You can also specify the name of a virtual device.

6.2  –  Description

    The DISMOUNT command closes all connections that EXCHANGE
    maintains to the device. This command does not affect the state
    of the operating system mount; the device remains accessible
    to OpenVMS. If you do not use the DISMOUNT command, an implicit
    DISMOUNT is automatically executed when you exit EXCHANGE.

    The DISMOUNT command is valid only with foreign devices.

6.3  –  Qualifiers

6.3.1    /MESSAGE

       /MESSAGE
       /NOMESSAGE

    Controls whether or not EXCHANGE displays a message that the
    volume was dismounted. The default is determined by the /MESSAGE
    qualifier on the EXCHANGE command when EXCHANGE was activated.

6.4  –  Example

  EXCHANGE> MOUNT/FOREIGN MTA0:
  EXCHANGE> COPY MTA0:AVERAGE.FOR/VOLUME_FORMAT=DOS11 *
  EXCHANGE> DISMOUNT MTA0:

      The first command in this example mounts the tape on the device
      MTA0. The second command in this example transfers a file from
      the magnetic tape to the current default directory. The last
      command releases EXCHANGE's access to the volume; however,
      the volume is still mounted on the operating system and is
      accessible to OpenVMS.

7  –  EXIT

    Terminates execution of EXCHANGE. Control is returned to the DCL
    command level. You can also use CTRL/Z to exit EXCHANGE.

    Format

      EXIT

8  –  HELP

    Displays information about EXCHANGE commands and qualifiers.

    Format

      HELP  [command [qualifier [option [option]]]]

8.1  –  Parameters

 command

    Specifies the name of the EXCHANGE command that you want
    information about. If you omit the command, HELP displays general
    information listing all commands recognized by EXCHANGE.

 qualifier

    Gives the name of the qualifier to be explained.

 option

    Gives the name of the option to be explained.

8.2  –  Description

    For an overview of EXCHANGE and a listing of the EXCHANGE command
    names, enter the HELP command with no arguments.

    If you enter HELP and the name of an EXCHANGE command, HELP
    displays a description of the command followed by a list of
    related qualifiers. For information on any of the related
    qualifiers, enter the qualifier name at the prompt.

    You can also obtain information on any EXCHANGE command qualifier
    by entering HELP, the command, and the qualifier at the EXCHANGE
    prompt, as follows:

    EXCHANGE> HELP COPY/CONTIGUOUS

    For information on a qualifier with options, enter HELP, the
    command, the qualifier, and the option at the EXCHANGE prompt.

    If you specify an asterisk (*)  in place of any keyword, the HELP
    command displays all information available at that level.

    If you specify an ellipsis ( . . . ) after any keyword, the HELP
    command displays all information relating to that keyword.

    You can specify percent signs and asterisks in the keyword as
    wildcard characters.

8.3  –  Example

  EXCHANGE> HELP COPY/VOLUME_FORMAT

      The command in this example displays the help that is available
      for the COPY qualifier /VOLUME_FORMAT.

9  –  INITIALIZE

    Formats and writes a label on a foreign mass storage volume.
    For directory-structured devices, the device directory is also
    initialized.

    Format

      INITIALIZE  device-name [volume-label]

      INITIALIZE/CREATE  file-name [volume-label]

9.1  –  Parameters

 device-name

    Specifies the name of the device on which the volume to be
    initialized is physically mounted.

    The device name can also refer to the name of a mounted virtual
    device to be reinitialized.

 file-name

    For INITIALIZE/CREATE, file-name refers to the name of a file to
    be created and initialized as a virtual device.

 volume-label

    Specifies the identification to be written onto the volume header
    for RT-11 volumes only. The volume label can contain up to a
    maximum of 12 alphanumeric characters. The default is OpenVMS
    Exchange. Use quotation marks to specify a volume label with
    lowercase letters.

9.2  –  Description

    The EXCHANGE command INITIALIZE erases all files from a volume.
    After initialization, the volume directory contains no files.
    DOS-11 magnetic tapes and RT-11 block-addressable devices can be
    initialized.

    The device must be mounted with the /FOREIGN qualifier.

9.3  –  Qualifiers

9.3.1    /ALLOCATION

       /ALLOCATION=n

    Specifies the allocation of a new virtual device file in terms
    of 512-byte blocks. The allocation specified is the number you
    entered as n. If you do not specify the /ALLOCATION qualifier
    when you create a new virtual device file, the default allocation
    is 494 blocks, the size of a single-density diskette. The maximum
    allocation is 65,536 blocks.

    A virtual device file is usually the size of a standard device
    supported by both RT-11 and OpenVMS. These sizes are as follows:

    Device    Blocks

    TU58      512
    RX01      494
    RX02      494 (single density)
    RX50      800
    RX02      988 (double density)
    RX33      2400
    RL02      20480
    RK06      27126
    RK07      53790

    You can also use the /ALLOCATION qualifier to reduce the size
    of a physical device. For example, if you want to prepare
    an RL02 disk but have only an RK07 device available, you can
    initialize the RK07 to a volume of 20,480 blocks. When the RL02
    is available, you can transfer the files to the RL02 knowing they
    will fit on the smaller device.

9.3.2    /BADBLOCKS

       /BADBLOCKS[=RETAIN]

    Performs a bad block scan of the volume before initialization. A
    file named FILE.BAD is created on top of each bad block or group
    of bad blocks encountered on the device, preventing any future
    use of the bad areas.

    If a bad block is found in either the boot block or the volume
    directory, the volume is not usable and EXCHANGE displays
    an error message. If the bad block is in a directory segment
    other than the first, you might be able to use the volume by
    reinitializing it with a smaller number of segments (see the
    /SEGMENTS qualifier description).

    If you specify /BADBLOCKS=RETAIN, EXCHANGE uses the device's
    existing bad block information, instead of performing a bad block
    scan. Therefore, initializing takes less time. If you do not
    specify RETAIN, EXCHANGE writes a pattern on each block of the
    volume, then reads each block to verify that the block is usable.
    EXCHANGE prints a list of the bad blocks found on the device.

    RK06, RK07, and RL02 disk volumes support bad block replacement.
    Therefore, HP recommends that you use the /REPLACE=RETAIN
    qualifier for these volumes. If you use the /BADBLOCKS qualifier
    with a volume initializied previously with the /REPLACE
    qualifier, EXCHANGE deletes the bad block replacement table and
    performs a new bad block scan. If you use /BADBLOCKS=RETAIN with
    such a volume, EXCHANGE uses the FILE.BAD files created during
    the volume initialization.

9.3.3    /CREATE

    Specifies that a virtual device is to be created and initialized.
    The specification is a file name; if a file type is not given,
    EXCHANGE applies the default type of DSK.

9.3.4    /DENSITY

       /DENSITY=density-value

    Specifies, for magnetic tape volumes, the density in bytes per
    inch (bpi) at which the tape is to be written.

    For magnetic tape volumes, the density value specified can be 800
    or 1600, as long as the density is supported by the magnetic tape
    drive. If you do not specify a density value for a blank tape,
    the system uses a default of the lowest density supported by the
    tape drive.

    For the RX02 dual-density diskette drive, use the DCL command
    INITIALIZE/DENSITY=SINGLE or INITIALIZE/DENSITY=DOUBLE to
    reformat the diskettes to a different density; then use the
    EXCHANGE command INITIALIZE to create the RT-11 directory
    structure.

                                   NOTE

       Diskettes formatted in double density cannot be read or
       written by the console block storage device (an RX01 drive)
       of a VAX-11/780 until they have been reformatted in single
       density.

9.3.5    /EXTRA_WORDS

       /EXTRA_WORDS=n

    Specifies, for RT-11 volumes, the number of extra words to add
    to each directory entry, in addition to the required seven words.
    The ability to increase the length of directory entries is useful
    for some RT-11 applications. Increasing the size of the directory
    entries reduces the number of entries that fit in each directory
    segment.

9.3.6    /MESSAGE

       /MESSAGE
       /NOMESSAGE

    Controls whether or not EXCHANGE displays a message that the
    volume was initialized. The default is determined by the /MESSAGE
    qualifier entered with the EXCHANGE command when EXCHANGE was
    activated.

9.3.7    /REPLACE

       /REPLACE=RETAIN

    Retains, when an RT-11 volume is initialized, the bad block
    replacement table and any existing FILE.BAD files.

    The RETAIN option is required; EXCHANGE cannot build a
    replacement table for a volume. The RT-11 system builds and
    uses the table based on specific hardware error conditions. The
    OpenVMS I/O system is different, and cannot be relied upon to
    generate exactly the same error conditions. Therefore, it is not
    possible for EXCHANGE to generate the same replacement table that
    would be generated by RT-11.

    If no replacement table is present, the qualifier /REPLACE=RETAIN
    is equivalent to /BADBLOCKS=RETAIN.

9.3.8    /SEGMENTS

       /SEGMENTS=n

    Defines, for RT-11 volumes, the number of 2-block directory
    segments to allocate for the directory. The number of segments
    in the directory establishes the number of files that can be
    stored on a device. The system allows a maximum of 72 files
    per directory segment and 31 directory segments per device. The
    argument n represents the number of segments; the valid range for
    n is from 1 to 31 (decimal). The default values for n depend on
    the device type, as follows:

    Device    Segments

    TU58      1
    RX01      1
    RX02      1 (single density)
    RX02      4 (double density)
    RX50      4
    RX33      16
    RL02      16
    RK06      16
    RK07      31

9.3.9    /VOLUME_FORMAT

       /VOLUME_FORMAT=option

    Defines the physical format of the volume to be processed.

    The EXCHANGE command INITIALIZE is not valid for Files-11
    devices.

9.4  –  Examples

    1.$ MOUNT/FOREIGN DLA2:
      %MOUNT-I-MOUNTED,                 mounted on DLA2
      $ EXCHANGE
      EXCHANGE> INITIALIZE DLA2:
      %EXCHANGE-S-INITIALIZED, the RT-11 volume _DLA2: has been initialized

      The command in this example initializes the volume mounted on
      the RL02 drive DLA2. Since DLA2 is a block-addressable device
      mounted with the /FOREIGN qualifier, RT-11 is the default
      format. EXCHANGE physically scans all blocks of the volume,
      builds a bad block replacement table, and displays a message
      indicating that it failed to turn up any bad blocks.

    2.EXCHANGE> INITIALIZE MTA0:/DENSITY=1600

      The command in this example initializes the DOS-11 magnetic
      tape volume loaded on MTA0. The density is specified as 1600
      bpi; the default would have been 800 bpi for an MT drive.

    3.EXCHANGE> INITIALIZE/CREATE/ALLOCATION=1000 VIRTUAL
      %EXCHANGE-S-INITIALIZED, the RT-11 volume DRB0:[LOGIN]VIRTUAL.DSK
      has been initialized

      The command in this example creates a virtual device with an
      allocation of 1000 blocks in the directory [LOGIN] on DRB0.
      EXCHANGE applies the default file type DSK.

10  –  MOUNT

    Makes a foreign volume and the files or data it contains
    available for processing by EXCHANGE. The EXCHANGE command MOUNT
    enters the device into internal tables maintained by EXCHANGE.

    Format

      MOUNT  device-name

      MOUNT/VIRTUAL  device-name file-name

10.1  –  Parameters

 device-name

    Specifies the physical device name or logical name of the device
    on which the volume is to be mounted. For MOUNT/VIRTUAL, the
    device-name parameter supplies a name for the virtual device.

 file-name

    For MOUNT/VIRTUAL only, the file-name parameter gives the name of
    the file containing the image of the foreign volume.

10.2  –  Description

    The EXCHANGE command MOUNT enters the description of the foreign
    volume in internal tables maintained by EXCHANGE. This command is
    different from the DCL command MOUNT, which enters the device in
    tables maintained by the OpenVMS operating system.

    A virtual volume must be explicitly mounted with the
    MOUNT/VIRTUAL command.

    If an EXCHANGE command is given on an unmounted foreign volume,
    EXCHANGE attempts to execute an implied MOUNT/FOREIGN/WRITE-
    /NODATACHECK on the device. This feature enables EXCHANGE to
    operate in the single-command DCL mode.

    If a MOUNT/FOREIGN (either implied or explicit) command is given
    for a foreign device that has not been mounted on the OpenVMS
    system, EXCHANGE issues the equivalent of the DCL command
    MOUNT/FOREIGN and attempts to make the volume known to the
    operating system. Any volume mounted in this way remains mounted
    after EXCHANGE exits.

    When EXCHANGE issues the MOUNT/FOREIGN command, the system checks
    the following:

    o  That the device has not been allocated to another user

    o  That a volume is physically loaded on the specified device

    o  For magnetic tapes, the volume accessibility field of the VOL1
       label

10.3  –  Qualifiers

10.3.1    /DATA_CHECK

       /DATA_CHECK[=(READ,WRITE)]
       /NODATA_CHECK

    Determines whether EXCHANGE performs a second operation after
    every I/O operation to verify that the data was correctly
    transferred. If you specify /DATA_CHECK=WRITE, after every
    write operation EXCHANGE rereads the data that was just written
    and compares it with the original data. If you specify /DATA_
    CHECK=READ, EXCHANGE reads each block of data twice and verifies
    that both read operations received identical data.

    It is usually more efficient to use the /DATA_CHECK option on
    the DCL command MOUNT than to use the option on the EXCHANGE
    command MOUNT. If you mount a device with the DCL command
    MOUNT/FOREIGN/DATA_CHECK, OpenVMS can use features in the
    device hardware and device driver to perform the redundant I/O
    operations.

    The RX01 and RX02 diskette drives do not contain the necessary
    features for the operating system to perform data checking. If
    you use the DCL command MOUNT/DATA_CHECK with a diskette, the
    system is unable to perform data checking (no warning message
    is displayed). EXCHANGE is able to recognize, however, that a
    diskette was mounted with the data checking option; in this case,
    EXCHANGE performs the software data checking internally, even if
    you have not specified an explicit MOUNT/DATA_CHECK command.

    If you specify the /DATA_CHECK qualifier without an option, the
    default is /DATA_CHECK=WRITE.

10.3.2    /FOREIGN

    Indicates that the volume is not in the standard format used by
    the OpenVMS operating system; that is, a magnetic tape volume
    is not in the standard ANSI format, or a disk volume is not in
    Files-11 format. The EXCHANGE command MOUNT mounts only foreign
    volumes. The /FOREIGN qualifier is the default. You must use the
    DCL command MOUNT to mount OpenVMS volumes.

    The default protection applied to foreign volumes is RWLP (Read,
    Write, Logical I/O, Physical I/O) for the system and owner. If
    you mount a volume currently in Files-11 format with the /FOREIGN
    qualifier, you must have the user privilege to override volume
    protection (VOLPRO), or your UIC must match the UIC on the
    volume.

10.3.3    /MESSAGE

       /MESSAGE
       /NOMESSAGE

    Controls whether EXCHANGE displays a message indicating that the
    volume was mounted. The default is determined by the /MESSAGE
    qualifier specified with the EXCHANGE command when EXCHANGE was
    invoked.

10.3.4    /VIRTUAL

    Mounts a Files-11 file as a virtual device. When you specify
    /VIRTUAL, the MOUNT command requires two parameters. The first
    parameter is a device name assigned as the name of the virtual
    device. The second parameter is the name of the Files-11 file
    that is the image of a foreign volume.

10.3.5    /VOLUME_FORMAT

       /VOLUME_FORMAT=option

    Defines the physical format of the volume to be processed.

10.3.6    /WRITE

       /WRITE
       /NOWRITE

    Controls whether the volume can be written. You can specify
    /NOWRITE to protect files by providing read-only access.
    Specifying /NOWRITE is equivalent to write-locking the device.

    The default is /WRITE. If /WRITE is specified (either explicitly
    or by default) and the volume itself is write-locked, EXCHANGE
    displays a message to inform you that the volume is write-locked.

10.4  –  Examples

    1.EXCHANGE> MOUNT MT:
      %EXCHANGE-I-MOUNTED, MATH06 mounted on _MTA0:

      The command in this example requests that the magnetic tape
      loaded on the device MTA0 be mounted as a foreign volume. The
      tape label is displayed, since the tape has been previously
      initialized as an ANSI-labeled tape with the label MATH06.
      This tape cannot be accessed as a Files-11 tape; it should
      be reinitialized as a DOS-11 tape during the current EXCHANGE
      session.

    2.EXCHANGE> MOUNT DMA1:
      %EXCHANGE-I-WRITELOCK, volume is write-locked
      %EXCHANGE-S-MOUNTED, volume DMA1: mounted

      The command in this example mounts the foreign volume that is
      loaded in the RK07 device DMA1, making the volume available
      for subsequent EXCHANGE commands. EXCHANGE recognizes that the
      volume itself is write-locked, and displays a message.

11  –  RENAME

    Changes the file specification of an existing file on an RT-11
    volume.

    Format

      RENAME  input-file-spec output-file-spec

11.1  –  Parameters

 input-file-spec

    Specifies the names of one or more files whose specifications are
    to be changed.

    You can use wildcard characters in the file name and file type
    specification; if you do, all files that satisfy the specified
    fields are renamed.

 output-file-spec

    Provides the new file specification to be applied to the input
    file. The RENAME command uses the file name and file type of the
    input file specification to provide defaults for nonspecified
    fields in the output file.

    You can specify an asterisk (*)  in place of the file name
    or file type of the output file; the RENAME command uses the
    corresponding field in the input file specification to name the
    output file. Specifying wildcard characters in corresponding
    fields of the input and output file specifications results in
    multiple rename operations.

    You can omit the device name from the output specification.
    EXCHANGE uses the device name specified for the input, since
    it is not possible to rename a file from one device to another.

11.2  –  Qualifiers

11.2.1    /LOG

       /LOG
       /NOLOG

    Controls whether the RENAME command displays the file
    specification of each file that it renames. The default is
    /NOLOG.

11.2.2    /PROTECT

       /PROTECT
       /NOPROTECT

    Determines whether protection is set for an RT-11 output file.
    The default is /NOPROTECT.

    This qualifier is not valid for Files-11 or DOS-11 output files.
    Protection attributes for Files-11 output are taken from the
    current process default protection.

    EXCHANGE does not attempt to transfer protection attributes
    from the input file to the output file. Protection mechanisms
    of various operating systems do not readily translate to one
    another.

    The owner UIC of the output file is the UIC of the current
    process.

11.2.3    /SYSTEM

       /SYSTEM
       /NOSYSTEM

    Controls whether the RENAME command renames files that have the
    file type SYS. These files are usually files necessary for the
    operation of an RT-11 system. Only RT-11 volumes handle SYS files
    in this manner.

    The default is /NOSYSTEM; the RENAME command does not rename an
    RT-11 file with the type SYS, whether it is matched by a wildcard
    specification or is named explicitly. EXCHANGE displays a message
    when it skips an SYS file during a rename operation.

    EXCHANGE handles files with the file type BAD in a similar
    manner; that is, the rename operation skips BAD files. However,
    EXCHANGE does not warn that BAD files are being skipped, and the
    /SYSTEM qualifier has no effect on BAD files. To rename a file
    with the type BAD, specify the file explicitly instead of using
    wildcards.

11.2.4    /VOLUME_FORMAT

       /VOLUME_FORMAT=option

    Defines the physical format of the volume to be processed.
    EXCHANGE supports the RENAME command on RT-11 volumes only.

11.3  –  Examples

    1.EXCHANGE> RENAME DMA0:AVERAG.OBJ MEAN

      The command in this example changes the file name of the file
      AVERAG.OBJ to MEAN.OBJ.

    2.EXCHANGE> RENAME DLA2:*.TXT *.OLD

      The command in this example renames all files with the file
      type TXT to files with the file type OLD; the file names are
      not changed.

    3.EXCHANGE> RENAME/LOG   DMA0:DATA.*   NEW
      %EXCHANGE-I-RENAMED, _DMA0:DATA.AAA renamed to _DMA0:NEW.AAA
      %EXCHANGE-I-RENAMED, _DMA0:DATA.BBB renamed to _DMA0:NEW.BBB
      %EXCHANGE-I-RENAMED, _DMA0:DATA.CCC renamed to _DMA0:NEW.CCC

      The command in this example illustrates wildcard characters in
      the input file names. The device DMA0 contains three files with
      the file name DATA; the result is the renaming of all three
      files as displayed by the /LOG qualifier.

12  –  SHOW

    Displays the devices currently mounted by EXCHANGE.

    Format

      SHOW

12.1  –  Example

  EXCHANGE> MOUNT DKA0:
  %EXCHANGE-I-VMSMOUNT, a "$ MOUNT /FOREIGN DKA0:" command was done
                by Exchange
  %EXCHANGE-S-MOUNTED, the RT-11 volume _DKA0: has been mounted
  EXCHANGE> MOUNT DLA2:
  %EXCHANGE-I-VMSMOUNT, a "$ MOUNT /FOREIGN DLA2:" command was done
                by Exchange
  %EXCHANGE-S-MOUNTED, the RT-11 volume _DLA2: has been mounted
  EXCHANGE> INITIALIZE/CREATE WRKD:[USER]VIRT.DSK
  %EXCHANGE-S-INITIALIZED, the RT-11 volume WRKD:[USER]VIRT.DSK;1
  has been initialized
  EXCHANGE> MOUNT/VIRTUAL DISK: VIRT.DSK
  %EXCHANGE-S-MOUNTVER, the RT-11 volume DISK: has been mounted
  using the file WRKD:[USER]VIRT.DSK;1

  EXCHANGE> SHOW

  Mounted volumes:
          volume format:          RT-11
          volume class:           disk (virtual volume)
          virtual file name:      WRKD:[USER]VIRT.DSK;1
          volume size:            494  blocks

   _DLA2:
          volume format:          RT-11
          volume class:           disk
          physical device name:   _DLA2:
          volume size:            20480 blocks

   _DKA0:
          volume format:          RT-11
          volume class:           disk
          physical device name:   _DKA0:
          volume size:            65535 blocks

  EXCHANGE>

      The MOUNT commands in this example mount foreign devices on
      drives DKA0 and DLA2. The SHOW command displays all devices
      currently mounted by EXCHANGE.

13  –  TYPE

    Displays the contents of a file or group of files on the current
    output device.

    Format

      TYPE  file-spec[, . . . ]

13.1  –  Parameters

 file-spec[, . . . ]

    Specifies the names of one or more input files to be copied. If
    you specify more than one input file, separate them with either
    commas or plus signs. You can specify standard OpenVMS wildcards
    in file names, both Files-11 and foreign. You can use wildcard
    directories with Files-11 and DOS-11 input.

    The syntax for the file names is dependent on the particular
    volume format option present or implied.

13.2  –  Qualifiers

13.2.1    /LOG

       /LOG
       /NOLOG

    Controls whether TYPE displays the file specifications of each
    file displayed.

    If you specify /LOG, the TYPE command displays the following for
    each copy operation:

    o  File specifications of the input and output files

    o  Number of blocks or the number of records copied (depending on
       whether the file is copied on a block-by-block or record-by-
       record basis)

13.2.2    /RECORD_FORMAT

       /RECORD_FORMAT=(option[, . . . ])

    Defines the internal record structure of a file and other
    attributes of the records.

13.2.3    /REWIND

       /REWIND
       /NOREWIND

    Controls whether the DOS-11 input magnetic tape reel logically
    rewinds to the beginning-of-tape mark before EXCHANGE searches
    for the file name given in the input specifier.

    Use this qualifier only for DOS-11 magnetic tape devices. The
    default is /NOREWIND; you should use /REWIND when you want TYPE
    to start searching for a file at the beginning of the magnetic
    tape rather than at the current position.

13.2.4    /VOLUME_FORMAT

       /VOLUME_FORMAT=option

    Defines the physical format of the volume to be processed. The
    default format qualifier is dependent on the device type.

13.3  –  Example

  EXCHANGE> TYPE DYA0:BEAM.RAT/VOLUME_FORMAT=RT11/RECORD=STREAM

      The command in this example copies the RT-11 file to the
      current SYS$OUTPUT device. The two qualifiers are the defaults
      if DYA0 was mounted as a foreign volume.

14    /NETWORK

    Enables the operating system to transfer files to or from
    operating systems that do not support OpenVMS file organizations.
    The transfer occurs over a DECnet network communications link
    that connects OpenVMS systems and non OpenVMS operating system
    nodes.

    Using DECnet services, the EXCHANGE/NETWORK command can perform
    any of the following tasks:

    o  Transfer files between an OpenVMS node and a non OpenVMS
       system node.

    o  Transfer a group of input files to a group of output files.

    o  Transfer files between two non OpenVMS nodes, provided those
       nodes share DECnet connections with the OpenVMS node that
       issues the EXCHANGE/NETWORK command.

    Format

      EXCHANGE/NETWORK  input-filespec[,...] output-filespec

14.1  –  Parameters

 input-filespec[,...]

    Specifies the name of an existing file to be transferred. The
    asterisk (*)  and the percent sign (%) wildcard characters are
    allowed. If you specify more than one file, separate the file
    specifications with commas (,).

 output-filespec

    Specifies the name of the output file into which the input is
    transferred.

    You must specify at least one field in the output file
    specification. If you omit the device or directory, your current
    default device and directory are used. The EXCHANGE/NETWORK
    command replaces any other missing fields (file name, file type,
    and version number) with the corresponding field of the input
    file specification.

    The EXCHANGE/NETWORK command creates a new output file for every
    input file that you specify.

    You can use the asterisk (*)  wildcard character in place
    of the file name, the file type, or the version number. The
    EXCHANGE/NETWORK command uses the corresponding field in the
    related input file to name the output file. You can also use the
    asterisk (*)  wildcard character in the output file specification
    to direct EXCHANGE/NETWORK to create more than one output file.
    For example:

    $  EXCHANGE/NETWORK A.A,B.B  MYPC::*.C

    This EXCHANGE/NETWORK command creates the files A.C and B.C at
    the non OpenVMS target node MYPC.

    A more complete explanation of the asterisk (*)  and the percent
    sign (%)  wildcard characters and version numbers follows in the
    Description section.

14.2  –  Qualifiers

14.2.1    /BACKUP

    Modifies the time value specified with the /BEFORE or the
    /SINCE qualifier. The /BACKUP qualifier selects files according
    to the dates of their most recent backups. This qualifier
    is incompatible with the /CREATED, /EXPIRED, and /MODIFIED
    qualifiers, which also allow you to select files according to
    time attributes. If you do not specify any of these four time
    qualifiers, the default is the /CREATED qualifier.

14.2.2    /BEFORE

       /BEFORE[=time]

    Selects only those files dated prior to the specified time. You
    can specify time as absolute time, as a combination of absolute
    and delta times, or as one of the following keywords: BOOT,
    LOGIN, TODAY (default), TOMORROW, or YESTERDAY. Specify one of
    the following qualifiers with the /BEFORE qualifier to indicate
    the time attribute to be used as the basis for selection:
    /BACKUP, /CREATED (default), /EXPIRED, or /MODIFIED.

    For complete information about specifying time values, see the
    OpenVMS User's Manual or the online help topic Date.

14.2.3    /BY_OWNER

       /BY_OWNER[=uic]

    Selects only those files whose owner user identification code
    (UIC) matches the specified owner UIC. The default UIC is that of
    the current process.

    Specify the UIC by using standard UIC format as described in the
    HP OpenVMS Guide to System Security.

14.2.4    /CONFIRM

       /CONFIRM
       /NOCONFIRM (default)

    Controls whether a request is issued before each file transfer
    operation to confirm that the operation should be performed on
    that file. The following responses are valid:

    YES      NO       QUIT
    TRUE     FALSE    Ctrl/Z
    1        0        ALL
             <Return>

    You can use any combination of uppercase and lowercase letters
    for word responses. Word responses can be abbreviated to one or
    more letters (for example, T, TR, or TRU for TRUE), but these
    abbreviations must be unique. Affirmative answers are YES, TRUE,
    and 1. Negative answers include: NO, FALSE, 0, and pressing
    Return. Entering QUIT or pressing Ctrl/Z indicates that you want
    to stop processing the command at that point. When you respond by
    entering ALL, the command continues to process, but no further
    prompts are given. If you type a response other than one of
    those in the list, DCL issues an error message and redisplays
    the prompt.

14.2.5    /CREATED

       /CREATED (default)

    Modifies the time value specified with the /BEFORE or the /SINCE
    qualifier. The /CREATED qualifier selects files based on their
    dates of creation. This qualifier is incompatible with the
    /BACKUP, /EXPIRED, and /MODIFIED qualifiers, which also allow
    you to select files according to time attributes. If you do not
    specify any of these four time qualifiers, the default is the
    /CREATED qualifier.

14.2.6    /EXCLUDE

       /EXCLUDE=(filespec[,...])

    Excludes the specified files from the file transfer operation.
    You can include a directory but not a device in the file
    specification. The asterisk (*)  and the percent sign (%)
    wildcard characters are allowed in the file specification;
    however, you cannot use relative version numbers to exclude a
    specific version. If you specify only one file, you can omit the
    parentheses.

14.2.7    /EXPIRED

    Modifies the time value specified with the /BEFORE or the /SINCE
    qualifier. The /EXPIRED qualifier selects files according to
    their expiration dates. (The expiration date is set with the
    SET FILE/EXPIRATION_DATE command.) The /EXPIRED qualifier
    is incompatible with the /BACKUP, /CREATED, and /MODIFIED
    qualifiers, which also allow you to select files according to
    time attributes. If you do not specify any of these four time
    qualifiers, the default is the /CREATED qualifier.

14.2.8    /FDL

       /FDL=fdl-filespec

    Specifies that the output file characteristics are described
    in the File Definition Language (FDL) file. Use this qualifier
    when you require special output file characteristics. For more
    information about FDL files, see the OpenVMS Record Management
    Utilities Reference Manual.

    Use of the /FDL qualifier implies that the transfer mode is
    block by block; however, the transfer mode you specify with the
    /TRANSFER_MODE qualifier prevails.

14.2.9    /LOG

       /LOG
       /NOLOG (default)

    Controls whether the EXCHANGE/NETWORK command displays the file
    specifications of each file copied.

    When you use the /LOG qualifier, the EXCHANGE/NETWORK command
    displays the following for each copy operation:

    o  The file specifications of the input and output files

    o  The number of blocks or the number of records copied
       (depending on whether the file is copied on a block-by-block
       or record-by-record basis)

14.2.10    /MODIFIED

    Modifies the time value specified with the /BEFORE or the /SINCE
    qualifier. The /MODIFIED qualifier selects files according to
    the date on which they were last modified. This time qualifier
    is incompatible with the /BACKUP, /CREATED, and /EXPIRED
    qualifiers, which also allow you to select files according to
    time attributes. If you do not specify any of these four time
    qualifiers, the default is the /CREATED qualifier.

14.2.11    /SINCE

       /SINCE[=time]

    Selects only those files dated on or after the specified time.
    You can specify time as absolute time, as a combination of
    absolute and delta times, or as one of the following keywords:
    BOOT, JOB_LOGIN, LOGIN, TODAY (default), TOMORROW, or YESTERDAY.
    Specify one of the following time qualifiers with the /SINCE
    qualifier to indicate the time attribute to be used as the
    basis for selection: /BACKUP, /CREATED (default), /EXPIRED, or
    /MODIFIED.

    For complete information about specifying time values, see the
    OpenVMS User's Manual or the online help topic Date.

14.2.12    /STYLE

       /STYLE=keyword

    Specifies the file name format for display purposes.

    The valid keywords for this qualifier are CONDENSED and EXPANDED.
    Descriptions are as follows:

    Keyword     Explanation

    CONDENSED   Displays the file name representation of what is
    (default)   generated to fit into a 255-length character string.
                This file name may contain a DID or FID abbreviation
                in the file specification.
    EXPANDED    Displays the file name representation of what is
                stored on disk. This file name does not contain any
                DID or FID abbreviations.

    The keywords CONDENSED and EXPANDED are mutually exclusive. This
    qualifier specifies which file name format is displayed in the
    output message, along with the confirmation if requested.

    File errors are displayed with the CONDENSED file specification
    unless the EXPANDED keyword is specified.

    See the HP OpenVMS System Manager's Manual, Volume 1: Essentials
    for more information.

14.2.13    /SYMLINK

       /SYMLINK=keyword

    The valid keywords for this qualifier are [NO]WILDCARD and
    [NO]ELLIPSIS. Descriptions are as follows:

    Keyword     Explanation

    WILDCARD    Indicates that symlinks are enabled during wildcard
                searches.
    NOWILDCARD  Indicates that symlinks are disabled during directory
                wildcard searches.
    ELLIPSIS    Equivalent to WILDCARD (included for command
                symmetry).
    NOELLIPSIS  Indicates that symlinks are matched for all wildcard
                fields except for ellipsis.

    If the file named in the EXCHANGE/NETWORK command is a symlink,
    the command operates on the symlink target.

14.2.14    /TRANSFER_MODE

       /TRANSFER_MODE=option

    Specifies the I/O method to be used in the transfer. This
    qualifier is useful for all file formats. You can specify any
    one of the following options:

    Option                Function

    AUTOMATIC             Allows the EXCHANGE/NETWORK command to
                          determine the appropriate transfer mode.
                          This is the default transfer mode.

    BLOCK                 Opens both the input and output files for
                          block I/O and transfers the files block by
                          block.

    CONVERT[=option[,...]]Reads records from the input file, packs
                          them into blocks, and writes them to the
                          output file in block mode. The options
                          listed in the following table determine
                          what additional information is inserted
                          during the transfer.

    RECORD                Opens both the input and output files for
                          record I/O and transfers the files record
                          by record. The target system must support
                          record operations, and the input file must
                          be record oriented.

    The following four options are available with the CONVERT
    transfer mode to control the insertion of special characters
    in the records:

    Option                Function

    CARRIAGE_CONTROL      Any carriage control information in the
                          input file is interpreted, expanded into
                          actual characters, and included with each
                          record.

    COUNTED               The length of each record, in bytes, is
                          included at the beginning of the record.
                          The length includes all FIXED_CONTROL,
                          CARRIAGE_CONTROL, and RECORD_SEPARATOR
                          information in each record.

    FIXED_CONTROL         All variable length with fixed control
                          record (VFC) information is written to
                          the output file as part of the data. This
                          information follows the record length
                          information, if the COUNTED option was
                          specified.

    RECORD_SEPARATOR=     A 1- or 2-byte record separator is inserted
    separator             between each record. Record separator
                          characters are the last characters in the
                          record. The three choices for separator
                          characters are as follows:

                          o  CR: Specifies carriage return only.

                          o  LF: Specifies line feed only.

                          o  CRLF: Specifies carriage return and line
                             feed.

14.3  –  Examples

    1.$ EXCHANGE/NETWORK VMS_FILE.DAT KUDOS::FOREIGN_SYS.DAT

      In this example, the EXCHANGE/NETWORK command transfers the
      file VMS_FILE.DAT located in the current default device and
      directory to the file FOREIGN_SYS.DAT on the non OpenVMS node
      KUDOS. Because the /TRANSFER_MODE qualifier was not explicitly
      specified, the EXCHANGE/NETWORK command automatically
      determines whether the transfer method should be block or
      record I/O.

    2.$ EXCHANGE/NETWORK/TRANSFER_MODE=BLOCK -
      _$ KUDOS::FOREIGN_SYS.DAT VMS_FILE.DAT

      In this example, the EXCHANGE/NETWORK command transfers the
      file FOREIGN_SYS.DAT from the non OpenVMS node KUDOS to the
      file VMS_FILE.DAT in the current default device and directory.
      Block I/O is specified for the transfer mode.

    3.$ EXCHANGE/NETWORK/FDL=VMS_FILE_DEFINITION.FDL -
      _$ KUDOS::REMOTE_FILE.TXT  VMS_FILE.DAT

      In this example, the EXCHANGE/NETWORK command transfers the
      file REMOTE_FILE.TXT on node KUDOS to the file VMS_FILE.DAT.
      The file attributes for the output file VMS_FILE.DAT are
      obtained from the File Definition Language (FDL) source
      file VMS_FILE_DEFINITION.FDL. Because the qualifier /FDL is
      specified and the /TRANSFER_MODE qualifier is omitted, the
      transfer mode uses block I/O, by default.

      For more information about creating FDL files, see the OpenVMS
      Record Management Utilities Reference Manual.

    4.$ EXCHANGE/NETWORK -
      _$ /TRANSFER_MODE=CONVERT=(CARRIAGE_CONTROL,COUNTED, -
      _$ RECORD_SEPARATOR=CRLF,FIXED_CONTROL) -
      _$ PRINT_FILE.TXT  KUDOS::*

      In this example, the EXCHANGE/NETWORK command transfers the
      file PRINT_FILE.TXT from the current default device and
      directory to the file PRINT_FILE.TXT on the non OpenVMS node
      KUDOS. The use of the CONVERT option with the /TRANSFER_MODE
      qualifier forces the input file to be read in record by record,
      modified as specified by the CONVERT options that follow, and
      written to the output file block by block. As many records as
      will fit are packed into the output blocks.

      The CONVERT option CARRIAGE_CONTROL specifies that carriage
      control information is converted to ASCII characters and
      inserted before the data or appended to the record, depending
      on whether prefix control or postfix control, or both, are
      used.

      The CONVERT option FIXED_CONTROL specifies that any fixed
      control information be translated to ASCII characters and
      inserted at the beginning of the record.

      The CONVERT option RECORD_SEPARATOR=CRLF appends the two
      specified characters, carriage return and line feed, to the
      end of the record.

      The CONVERT option COUNTED specifies that the total length
      of the record must be counted (once the impact of all the
      previous convert options have been added), and the result is
      to be inserted at the beginning of the record, in the first 2
      bytes.
Close Help