HELP EXCHANGE — VMS 5.0
EXCHANGE UTILITY (EXCHANGE)
The Exchange Utility (EXCHANGE) is a utility program that is used
with mass-storage volumes that are formatted for operating
systems other than VMS.
EXCHANGE performs file transfers and format conversions on:
o DOS-11 magnetic tape volumes
o Files-11 volumes
o RT-11 block-addressable volumes
In addition to transferring files, EXCHANGE allows you to:
o Initialize foreign volumes, and scan for bad blocks
o List directories of volumes
o Delete files from block-addressable volumes
o Rename files on block-addressable volumes
o Write boot blocks on VAX-11 processor consoles
o Mount and dismount foreign volumes
To see more detailed information about EXCHANGE, please invoke
the EXCHANGE utility and give the HELP command to the EXCHANGE>
prompt.
Additional information available:
COPYDELETEDIRECTORYDISMOUNTEXITHELP
INITIALIZEMOUNTRENAMESHOWTYPE
InvokingCommand FormatsVolume FormatsRecord Formats
CarriageControlTransfer ModesVirtual Devices
Invoking
You can use EXCHANGE interactively or as a DCL command. To
begin an interactive dialogue with EXCHANGE, enter the following to
the DCL prompt:
$ EXCHANGE
The utility responds with the prompt:
EXCHANGE>
You can now enter any EXCHANGE command string. To return to DCL
from the EXCHANGE> prompt, type EXIT or CTRL/Z.
To use EXCHANGE as a DCL command, append the command string to
the EXCHANGE verb, as shown below.
$ EXCHANGE DIRECTORY CSA1:*.CMD
Additional information available:
Qualifiers
EXCHANGE allows one qualifier on the EXCHANGE verb itself. This qualifier must be placed immediately after the EXCHANGE verb, it cannot be placed on the EXCHANGE command string. The verb qualifier is used to define a condition which is to remain in effect for the entire EXCHANGE session.
Additional information available:
/MESSAGE
/MESSAGE (default)
/NOMESSAGE
In the usual case (i.e. with /MESSAGE in effect), EXCHANGE
will print a status message when a volume is initialized,
when a volume is mounted, and when a volume is dismounted.
If the /NOMESSAGE qualifier is used, the default for
EXCHANGE is to not print any messages for these commands.
Command Formats
Most EXCHANGE command strings are very similar to the analoguous DCL command for native volumes. The general form for the EXCHANGE command string is: verb/qualifier file-spec/qualifier[,...] [file-spec/qualifier] The second file-spec is only needed for commands that specify data transfers or require additional parameters.
Additional information available:
Verbs
The verb defines the action to be performed by EXCHANGE.
The verb is the same as the DCL command verb that performs a
similar function on native volumes. Valid verbs are:
COPY Copy files from input to output spec
DELETE Delete files from block-addressable volumes
DIRECTORY List names of files on volume
DISMOUNT Dismount a volume
EXIT Return to the DCL command level
HELP Obtain help on EXCHANGE commands
INITIALIZE Create an empty volume
MOUNT Mount a volume on a device (foreign only)
RENAME Rename files on block-addressable volumes
SHOW Show volumes known to EXCHANGE
TYPE Display files on the default output device
Volume Formats
EXCHANGE uses the /VOLUME_FORMAT=option qualifier to define the
physical format of volumes to be processed.
EXCHANGE /VOLUME_FORMAT Options
Option Function
FILES11 Identifies a Files-11 formatted native volume
RT11 Identifies an RT-11 block-addressable volume
DOS11 Identifies a DOS-11 formatted magnetic tape volume
Record Formats
EXCHANGE uses the /RECORD_FORMAT=option qualifier to define the
internal record structure of a file on a foreign volume.
EXCHANGE /RECORD_FORMAT Options
Option Function
BINARY Identifies PDP-11 formatted binary records
FIXED[=n] Identifies fixed-length record format, length
n defaults to 512
STREAM Identifies ASCII stream record format
PAD=c Sets the character to pad short records on
fixed-length output, valid only with FIXED
CarriageControl
The /CARRIAGE_CONTROL qualifier is used to specify the carriage
control attributes of a file. It is useful for Files-11 output
files only.
EXCHANGE /CARRIAGE_CONTROL
Option Function
CARRIAGE_RETURN Implied carriage-return/line-feed control
FORTRAN FORTRAN carriage control record attribute
NONE No implied carriage control
Transfer Modes
The /TRANSFER_MODE qualifier is used to specify the I/O method to
be used in a transfer. This option is useful for all volume
formats.
/TRANSFER_MODE Options
Option Function
AUTOMATIC Select BLOCK transfer for efficiency if
possible
BLOCK Transfer block-by-block
RECORD Transfer record-by-record
Virtual Devices
A virtual-device is a VAX-11 RMS file which contains an image of
a foreign block-addressable device. EXCHANGE treats a virtual-
device as a foreign volume.
EXCHANGE must be used in interactive mode to manipulate a
virtual-device.
EXCHANGE> mount /virtual disk: virtual.dsk
%EXCHANGE-S-MOUNTVIR, the RT-11 virtual volume DISK: has been
mounted using the file DRA2:<JOYNER>VIRTUAL.DSK;1
EXCHANGE> directory disk:
Directory of RT-11 volume DISK: 27-Sep-1984 08:30
using DRA2:<JOYNER>VIRTUAL.DSK;1
ANSI.COM 1 10-Mar-1983 QARINV.TXT 3 17-Sep-1984
REASSI.COM 13 16-Mar-1984 SYSCRE.MAC 1 16-May-1983
Total of 4 files, 18 blocks. Free space 4944 blocks, largest 4474.
EXCHANGE> copy /log sys$login:work.txt disk:
%EXCHANGE-S-COPIED, _SLOTH$DUA17:<HOBBS.WRKD$.LOGIN>WORK.TXT;10
copied to DISK:WORK.TXT, 73 records
COPY
The EXCHANGE command COPY transfers a file or files from the input
volume to the output volume. EXCHANGE> COPY can:
o Copy a file between a foreign volume and a native 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 between volumes
o Give the output file a different name from the input
o Copy RT-11 monitor bootstrap information, to make a bootable
volume
Format
EXCHANGE> COPY input-file-spec[,...] output-file-spec
Prompts
Input file(s): input-file-spec[,...]
Output file: output-file-spec
Additional information available:
Parameters
input-file-spec[,...]
Specifies the names of one or more input files to be copied.
output-file-spec
Specifies the name of the output file, directory or device to
which the input files are to be copied.
Qualifiers
Additional information available:
/BOOT/LOG/ALLOCATION/BEST_TRY_CONTIGUOUS
/CARRIAGE_CONTROL/CONTIGUOUS/DELETE/EXTENSION
/PROTECT/RECORD_FORMAT/REPLACE/REWIND/START_BLOCK
/TRANSFER_MODE/TRUNCATE/VOLUME_FORMAT
/BOOT[=nn]
This qualifier copies bootstrap information from a monitor
file to blocks 0 and 2 through 5 of an RT-11 volume,
permitting you to use that volume as a VAX-11 processor
console volume. EXCHANGE will automatically sense whether the
volume uses early or late format bootstrapping. The optional
two-letter value tells the name of the handler file to be
used for late format bootstraps, it defaults to the handler
for the actual device type.
/LOG
/LOG
/NOLOG
Controls whether EXCHANGE COPY displays the file
specifications of each file copied.
/ALLOCATION
/ALLOCATION=n
Forces the initial allocation of the output file to the number of
512-byte blocks specified as n. /ALLOCATION is only valid for
Files-11 and RT-11 output files.
/BEST_TRY_CONTIGUOUS
/BEST_TRY_CONTIGUOUS
/NOBEST_TRY_CONTIGUOUS
Indicates whether the 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.
/CARRIAGE_CONTROL
/CARRIAGE_CONTROL=option
The /CARRIAGE_CONTROL qualifier defines the carriage control
attributes of a file.
/CONTIGUOUS
/CONTIGUOUS
/NOCONTIGUOUS
Indicates whether the output file is to be contiguous -- that is,
whether the file must occupy consecutive physical disk blocks.
/DELETE
/DELETE
/NODELETE
This qualifier controls whether EXCHANGE COPY will delete
existing files of the same name during the copy operation.
/EXTENSION
/EXTENSION=n
Specifies the number of blocks to be added to the output file
each time the file is extended.
/PROTECT
/PROTECT
/NOPROTECT
Defines the protection to be applied to an RT-11 output file.
RT-11 files are either protected (/PROTECT specified) or
unprotected (/NOPROTECT, the default).
/RECORD_FORMAT
/RECORD_FORMAT=(option[,...])
The /RECORD_FORMAT qualifier defines the internal record
structure of a file and other attributes of the records.
Option Function
BINARY Identifies formatted binary mode
FIXED[=n] Identifies fixed-length record format, length n
STREAM Identifies ASCII stream mode transfers
PAD Sets the character to pad short records
/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.
/REWIND
/REWIND
/NOREWIND
Causes the DOS-11 input tape reel to be logically rewound
(/REWIND) or not rewound (/NOREWIND) to beginning-of-tape
before searching for the input file.
/START_BLOCK
/START_BLOCK=n
For RT-11 volumes the /START_BLOCK qualifier can be used to
specify the logical block number where the file should be
placed. This can be especially useful with TU58 data
cartridges, because performance can be significantly
enhanced by careful placement of files.
/TRANSFER_MODE
/TRANSFER_MODE=option
The /TRANSFER_MODE option determines how EXCHANGE will
transfer the file. See Transfer_Modes for a more complete
description.
/TRUNCATE
/TRUNCATE
/NOTRUNCATE
Controls whether the EXCHANGE COPY command truncates an output
file at the end-of-file when copying it. By default, the COPY
command uses the allocation of the input file to determine the
size of the output file.
/VOLUME_FORMAT
/VOLUME_FORMAT=option
The /VOLUME_FORMAT qualifier defines the physical format of the
volume to be processed.
DELETE
Deletes one or more files from a foreign block-addressable mass
storage volume. EXCHANGE does not delete files from DOS-11 or Files-11
volumes.
Format
EXCHANGE> DELETE file-spec[,...]
Prompt
Filename(s): file-spec[,...]
Additional information available:
Parameters
file-spec[,...]
Specifies the names of one or more files to be deleted.
Qualifiers
Additional information available:
/LOG
/LOG
/NOLOG
Controls whether the EXCHANGE DELETE command displays the file
specification of each file after its deletion.
/SYSTEM
/SYSTEM
/NOSYSTEM
Controls whether the EXCHANGE DELETE command deletes files which
have a file extension of ".SYS" or ".BAD" on RT-11 volumes.
/VOLUME_FORMAT
/VOLUME_FORMAT=option
The /VOLUME_FORMAT qualifier defines the physical format of the
volume to be processed. RT-11 volumes are currently the only
volumes on which DELETE is supported.
DIRECTORY
Provides a list of files or information about a file or group of
files.
Format
EXCHANGE> DIRECTORY [file-spec[,...]]
Prompts
None.
Additional information available:
Parameters
file-spec[,...]
Specifies one or more files to be listed.
Qualifiers
Additional information available:
/ALL/BADBLOCKS/BLOCKS/BRIEF/COLUMNS/DATE
/DELETED/FREE/FULL/OCTAL/OUTPUT/OWNER/PRINTER
/SIZE/SUMMARY/VOLUME_FORMAT
/ALL
/ALL
/NOALL
The /ALL qualifier is used to list all deleted or unused files on
an RT-11 volume, in addition to other files selected by the
command. For example, the command
EXCHANGE> DIRECTORY DMA0:*.MAC/ALL
lists all MACRO-11 source files, plus deleted and unused files.
/BADBLOCKS
/BADBLOCKS
/NOBADBLOCKS
The /BADBLOCKS qualifier initiates a scan of the volume to find
any blocks which return read errors. The data on the volume is
not modified. If a bad-block replacement table is present, the
contents of the table will be displayed. This is valid for
RT-11 volumes only.
/BLOCKS
/BLOCKS
/NOBLOCKS
The /BLOCKS qualifier lists the starting block number of the
file. This is only valid for directories of block-addressable
devices. The first block of the device is block number 0.
/BRIEF
/BRIEF
/NOBRIEF
Includes only the file name of each file to be listed. /BRIEF
format is equivalent to /NODATE/NOSIZE.
/COLUMNS
/COLUMNS=n
Lists the files using the specified number of columns on each
line of the display.
/DATE
/DATE
/NODATE
Includes the date for each file listed.
/DELETED
/DELETED
/NODELETED
This qualifier lists a directory of files that have been deleted
from an RT-11 device, but whose file name information has not
been destroyed.
/FREE
/FREE
/NOFREE
The /FREE qualifier is used to include unused areas in the
directory listing. The /FREE qualifier is only valid with RT11
format volumes.
/FULL
The /FULL qualifier lists all the available information for each
file.
/OCTAL
/OCTAL
/NOOCTAL
Controls whether numeric information is printed in decimal or
octal format. The default is /NOOCTAL, numbers are printed in
decimal radix. Dates are always printed in decimal format.
/OUTPUT
/OUTPUT[=file-spec]
Requests that the DIRECTORY command output be written to the file
specified rather than to the current SYS$OUTPUT device.
/OWNER
/OWNER
/NOOWNER
The /OWNER qualifier includes information about the owner of
the files.
/PRINTER
Queues the command output for printing under the name given by
the /OUTPUT qualifier. If you do no specify /OUTPUT, the file
is EXCHDIRE.LIS.
/SIZE
/SIZE
/NOSIZE
Provides the file size in blocks used for each file listed.
/SUMMARY
/SUMMARY
/NOSUMMARY
This qualifier 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 will be displayed.
/VOLUME_FORMAT
/VOLUME_FORMAT=option
The /VOLUME_FORMAT qualifier defines the physical format of the
volume to be processed.
DISMOUNT
Releases a volume previously accessed with the EXCHANGE MOUNT command.
It does not change the mount status as seen by VMS.
Format
EXCHANGE> DISMOUNT device-name[:]
Prompt
Device: device-name[:]
Additional information available:
ParametersDescriptionQualifier
Parameters
device-name[:]
Specifies the name of the device to be dismounted. You can
specify a physical device name, a logical name assigned to a
physical device, or the name of a virtual-device.
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 mounted in the
VMS sense.
Qualifier
Additional information available:
/MESSAGE
/MESSAGE
/NOMESSAGE
The /MESSAGE qualifier controls whether or not EXCHANGE
prints a message which says that the volume was dismounted.
EXIT
Terminates execution of EXCHANGE. Control is returned to the DCL
command level.
Format
EXCHANGE> EXIT
Prompts
None.
HELP
Displays information from the internal EXCHANGE help library, which is more complete than this DCL-level help.
INITIALIZE
Formats and writes a label on a foreign mass storage volume. For
directory-structured devices, the device directory is also
initialized.
Format
EXCHANGE> INITIALIZE device-name
EXCHANGE> INITIALIZE /CREATE file-name
Prompts
For device or mounted virtual-device initialize:
Device: device-name
For new virtual-device creation (INITIALIZE/CREATE):
Filename: file-name
Additional information available:
ParametersDescriptionQualifiers
Parameters
device-name
Specifies the name of the device on which the volume to be
initialized is physically mounted. If the device is not mounted
on VMS, Exchange executes a $ MOUNT /FOREIGN on your behalf.
The device name can also refer to the name of a mounted
virtual-device which is to be re-initialized.
file-name
For INITIALIZE/CREATE, the file-name refers to the name of a file
which is to be created and initialized as a virtual device.
Description
The EXCHANGE INITIALIZE command is used to erase all files from a
volume. After initialization, the volume directory contains no
files. DOS-11 magnetic tapes and RT-11 block-addressable devices
may be initialized.
Qualifiers
Additional information available:
/ALLOCATION/BADBLOCKS/CREATE/DENSITY/EXTRA_WORDS
/MESSAGE/REPLACE/SEGMENTS/VOLUME_FORMAT
/ALLOCATION
/ALLOCATION=n
Specifies the allocation of a new virtual-device file as the
number of 512-byte blocks specified as n. If /ALLOCATION is not
specified when creating a new virtual-device file, EXCHANGE will
default to an allocation of 494 blocks, the size of a single
density floppy diskette. The maximum allocation is 65535 blocks.
/BADBLOCKS
/BADBLOCKS[=RETAIN]
If /BADBLOCKS is specified, EXCHANGE will perform a bad-block
scan of the volume before initialization. This involves
writing a test pattern across the entire volume, and recording
which blocks generate errors. The volume is then initialized,
and a file with the name FILE.BAD is created on top of each of
the bad blocks, which prevents any other use of the bad areas.
If /BADBLOCKS=RETAIN is specified, EXCHANGE does not perform a
bad-block scan. Instead, it remembers the locations of all
*.BAD files on the volume. After initialization, a file named
FILE.BAD is created on top of each of the bad blocks.
/CREATE
Says that a virtual device should be created and initialized,
see help for Virtual_Device for more information on the use
of virtual devices.
/DENSITY
/DENSITY=density-value
Specifies for magnetic tape volumes, the density in bytes
per inch (bpi) at which the tape is to be written.
/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.
/MESSAGE
/MESSAGE
/NOMESSAGE
The /MESSAGE qualifier controls whether or not EXCHANGE
prints a message which says that the volume was initialized.
/REPLACE=RETAIN
/REPLACE=RETAIN
When /REPLACE=RETAIN is specified for an RT-11 volume, EXCHANGE
will retain the bad block replacement table and bad files
across initialization. The RETAIN option is required, EXCHANGE
can not build a replacement table for a volume.
/SEGMENTS
/SEGMENTS=n
This qualifier defines, for RT-11 volumes, the number of 2-block
directory segments to allocate for the directory.
/VOLUME_FORMAT
/VOLUME_FORMAT=option
The /VOLUME_FORMAT qualifier defines the physical format of the
volume to be processed.
MOUNT
Makes a foreign volume and the files or data it contains available for
processing by EXCHANGE. The EXCHANGE MOUNT command enters the device
into internal tables maintained by EXCHANGE. If the device has not
been mounted on VMS with the DCL MOUNT command, EXCHANGE will perform
the equivalent of a $MOUNT /FOREIGN for you.
Format
EXCHANGE> MOUNT device-name
EXCHANGE> MOUNT /VIRTUAL device-name file-name
Prompts
For MOUNT /FOREIGN:
Device: device-name
For MOUNT /VIRTUAL:
Virtual device: device-name
Filename: file-name
Additional information available:
ParametersDescriptionQualifiers
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 by which the virtual-device
will be known.
file-name
For MOUNT /VIRTUAL only, the file-name parameter gives the name
of the file containing the image of the foreign volume.
Description
The EXCHANGE MOUNT command enters the description of the foreign
volume in internal tables maintained by EXCHANGE. It is separate
and distinct from the DCL MOUNT command, which enters the device
in tables maintained by the VMS operating system.
Qualifiers
Additional information available:
/DATA_CHECK/FOREIGN/MESSAGE/VIRTUAL/VOLUME_FORMAT
/WRITE
/DATA_CHECK
/DATA_CHECK[=(READ,WRITE)]
/NODATA_CHECK
The /DATA_CHECK qualifier determines whether EXCHANGE performs a
second operation after every I/O operation to verify that the
data was correctly transferred.
/FOREIGN
Indicates that the volume is a physical device, not a virtual
device.
/MESSAGE
/MESSAGE
/NOMESSAGE
The /MESSAGE qualifier controls whether or not EXCHANGE
prints a message which says that the volume was mounted.
/VIRTUAL
The /VIRTUAL qualifier is used to mount a Files-11 file as a
virtual-device. When /VIRTUAL is used, the MOUNT command takes
two parameters. The first parameter is a device-name which will
be assigned as the name of the virtual-device. The second
parameter is the name of the Files-11 file which is the image of
a foreign volume.
/VOLUME_FORMAT
/VOLUME_FORMAT=option
The /VOLUME_FORMAT qualifier defines the physical format of the
volume to be processed.
/WRITE
/WRITE
/NOWRITE
Controls whether the volume can be written.
RENAME
Changes the file specification of an existing file on a block-
addressable foreign volume.
Format
EXCHANGE> RENAME input-file-spec output-file-spec
Prompts
From: input-file-spec
To: output-file-spec
Additional information available:
Parameters
input-file-spec
Specifies the names of one or more files whose specifications are
to be changed.
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.
Qualifiers
Additional information available:
/LOG
/LOG
/NOLOG
Controls whether the RENAME command displays the file
specification of each file that it renames.
/SYSTEM
/SYSTEM
/NOSYSTEM
Controls whether the EXCHANGE RENAME command renames files which
have a file extension of ".SYS". These files are typically files
which are necessary for the operation of an RT-11 system. Only
RT-11 volumes treat .SYS files in this special manner.
/VOLUME_FORMAT
/VOLUME_FORMAT=option
The /VOLUME_FORMAT qualifier defines the physical format of the
volume to be processed. Currently RT-11 volumes are the only
volumes on which RENAME is supported.
SHOW
Shows devices currently known to EXCHANGE.
Format
EXCHANGE> SHOW
Prompts
None.
TYPE
The EXCHANGE TYPE command displays the contents of a file or group of
files on the current output device.
Format
EXCHANGE> TYPE file-spec[,...]
Prompts
File: file-spec[,...]
Additional information available:
Parameters
file-spec[,...]
Specifies the names of one or more input files to be shown.
Qualifiers
Additional information available:
/LOG/RECORD_FORMAT/REWIND/VOLUME_FORMAT
/LOG
/LOG
/NOLOG
Controls whether EXCHANGE TYPE displays the file specifications
of each file printed.
/RECORD_FORMAT
/RECORD_FORMAT=(option[,...])
The /RECORD_FORMAT qualifier defines the internal record
structure of a file and other attributes of the records.
/REWIND
/REWIND
/NOREWIND
Causes the DOS-11 input tape reel to be logically rewound (/REWIND)
or not rewound (/NOREWIND) to beginning-of-tape before EXCHANGE
searches for the input file name.
/VOLUME_FORMAT
/VOLUME_FORMAT=option
The /VOLUME_FORMAT qualifier defines the physical format of the
volume to be processed.