The program MYPROG requires two input files; these are read from the
logical device SYS$INPUT. The EOD command signals the end of the first
data file and the beginning of the second. The next line that begins
with a dollar sign (a PRINT command in this example) signals the end of
the second data file.
The JOB and PASSWORD commands mark the beginning of a batch job
submitted through the card reader; the EOJ command marks the end of the
job.
The EXAMINE command displays the contents of virtual memory. The
address is displayed in hexadecimal format and the contents are
displayed in the radix requested, as follows:
If the address specified is not accessible to user mode, four asterisks
(*) are displayed in the contents field.
Radix Qualifiers: The radix default for a DEPOSIT
command or an EXAMINE command determines how the command interprets
numeric literals. The initial default radix is hexadecimal; all numeric
literals in the command line are assumed to be hexadecimal values. If a
radix qualifier modifies an EXAMINE command, that radix becomes the
default for subsequent EXAMINE and DEPOSIT commands, until another
qualifier overrides it. For example:
$ EXAMINE/DECIMAL 900
00000384: 0554389621
|
The EXAMINE command interprets the location 900 as a decimal number and
displays the contents of that location in decimal. All subsequent
DEPOSIT and EXAMINE commands assume that numbers you enter for
addresses and data are decimal. Note that the EXAMINE command always
displays the address location in hexadecimal format.
Symbol names defined by = (assignment statement) commands are always
interpreted in the radix in which they were defined.
Note that hexadecimal values entered as examine locations or as data to
be deposited must begin with a numeric character (0 to 9); otherwise,
the command interpreter assumes that you have entered a symbol name,
and attempts symbol substitution.
You can use the radix operators %X, %D, or %O to override the current
default when you enter the EXAMINE command. For example:
$ EXAMINE/DECIMAL %X900
00000900: 321446536
|
This command requests a decimal display of the data in the location
specified as hexadecimal 900.
Length Qualifiers: The initial default length unit for
the EXAMINE command is a longword. The EXAMINE command displays data,
one longword at a time, with blanks between longwords. If a length
qualifier modifies the command, that length becomes the default length
of a memory location for subsequent EXAMINE and DEPOSIT commands, until
another qualifier overrides it.
Restriction on Placement of Qualifiers: The EXAMINE
command analyzes expressions arithmetically. Therefore, qualifiers are
interpreted correctly only when they appear immediately after the
command name.
The EXCHANGE/NETWORK command imposes the following restrictions:
- Transfers of files can occur only between disk devices. (If a disk
device is not the desired permanent residence for the file, you must
either move the file to a disk before issuing the command or retrieve
the file from a disk after the command completes.)
- The remote system must have a block size of 512 bytes, where a byte
is 8 bits long.
- The nodes transferring files must support the DECnet Data Access
Protocol (DAP).
The OpenVMS Record Management Services (RMS) facility provides the
operating system access to records in OpenVMS RMS files. To transfer
OpenVMS RMS files between two nodes where both nodes are OpenVMS nodes,
use one of the other DCL commands (such as COPY, APPEND, or CONVERT),
as appropriate. These commands recognize RMS file organizations and are
designed to ensure that RMS record structures are preserved as your
files are moved.
Use the EXCHANGE/NETWORK command to transfer files between OpenVMS
nodes and non OpenVMS nodes when the differences in the file
organizations would otherwise prevent the transfer or could lead to
undesirable results. While using the COPY command ensures that both the
contents and the attributes of a replicated file are preserved, the
EXCHANGE/NETWORK command has more advantages. The EXCHANGE/NETWORK
command offers you explicit control of your record attributes during
file transfers, with the opportunity to make a file usable on several
different operating systems.
The EXCHANGE/NETWORK command transfers files between OpenVMS nodes and
non OpenVMS nodes connected to the same DECnet network. If the non
OpenVMS system does not support OpenVMS file organizations, the
EXCHANGE/NETWORK command can modify or discard file and record
attributes during the transfer. However, if the target system is an
OpenVMS node, you have the option of applying new file and record
attributes to the output file by supplying a File Definition Language
(FDL) file, as described later in this section. The EXCHANGE/NETWORK
command provides a number of defaults to handle the majority of
transfers properly; however, in some situations you need to know your
file or record format requirements at both nodes.
OpenVMS File and Record Attributes
All RMS files in the OpenVMS environment include stored information,
known as the file and record attributes, to describe the file and
record characteristics. File attributes consist of items such as file
organization, file protection, and file allocation information. Record
attributes consist of items such as the record format, record size, key
definitions for indexed files, and carriage control information. These
attributes define the data format and access methods for the OpenVMS
RMS facility.
Non OpenVMS operating systems that do not support OpenVMS file
organizations have no means of storing file and record attributes with
their files. Transferring an OpenVMS file to a non OpenVMS system that
is unable to store and handle file and record attributes can result in
most of this information being discarded. Removing these attributes
from a file can render it useless if it must be returned to the OpenVMS
system.
Transferring Files to OpenVMS Nodes
When you transfer files to an OpenVMS system from a non OpenVMS system,
the files typically assume default file and record attributes; however,
you can specify the attributes that you want the file to acquire in a
File Definition Language (FDL) file. Alternatively, if transferring a
CDA document, enter the following command after the EXCHANGE/NETWORK
command:
$ SET FILE/SEMANTICS=[ddif,dtif] document-name.doc
|
If you specify an FDL file with the /FDL qualifier, the FDL file
determines the characteristics of the output file. This feature is
useful in establishing compatible file and record attributes when you
transfer a file from a non OpenVMS system to an OpenVMS system;
however, when you use an FDL file, you also assume responsibility for
determining the required characteristics.
For more information on FDL files, refer to the OpenVMS Record Management Utilities Reference Manual.
Transferring Files to Non OpenVMS Nodes
The EXCHANGE/NETWORK command discards file and record attributes
associated with an OpenVMS file during a transfer to a non OpenVMS
system that does not support OpenVMS file organizations. Be aware that
the loss of file and record attributes in the transfer can render the
output file useless for many applications.
Selecting Transfer Modes
The EXCHANGE/NETWORK command has four transfer mode options: AUTOMATIC,
BLOCK, RECORD, and CONVERT. For most file transfers, AUTOMATIC is
sufficient. The AUTOMATIC transfer mode option allows the
EXCHANGE/NETWORK command to transfer files using either block or record
I/O. The selection is based on the input file organization and the
operating systems involved.
Selecting the BLOCK transfer mode option forces the EXCHANGE/NETWORK
command to open both the input and output files for block I/O access.
The input file is then transferred to the output file block by block.
Use this transfer mode when you transfer executable images. It is also
useful when you must preserve a file's content exactly, which is a
common requirement when you store files temporarily on another system
or when cooperating applications exist on the systems.
Selecting the RECORD transfer mode option forces the EXCHANGE/NETWORK
command to open both the input file and output file for record I/O
access. The input file is then transferred to the output file record by
record. This transfer mode is primarily used for transferring text
files.
Selecting the CONVERT transfer mode option forces the EXCHANGE/NETWORK
command to open the input file for RECORD access and the output file
for BLOCK access. Records are then read in from the input file, packed
into blocks, and are written to the output file. This transfer mode is
primarily used for transferring files with no implied carriage control.
For example, to transfer a file created with DIGITAL Standard Runoff
(DSR) to a DECnet DOS system, you must use the CONVERT transfer mode
option. To transfer the resultant output file back to an OpenVMS node,
use the AUTOMATIC transfer mode option.
Wildcard Characters
The asterisk (*) and the percent sign (%) wildcard characters are
permitted in the file specifications and follow the behavior typical of
other OpenVMS system commands with respect to the OpenVMS node.
When more than one input file is specified, but the asterisk (*) or the
percent sign (%) wildcard characters are not specified in the output
file specification, the first input file is copied to the output file,
and each subsequent input file is transferred and given a higher
version number of the same output file name. Note that the files are
not concatenated into a single output file. Also note that when you
transfer files to foreign systems that do not support version numbers,
only one output file results, and it is the last input file.
To create multiple output files, specify multiple input files and use
at least one of the following:
- An asterisk (*) wildcard character in the output file name, file
type, or version number field
- Only a node name, a device name, or a directory specification as
the output file specification
When you create multiple output files, the EXCHANGE/NETWORK command
uses the corresponding field from each input file in the output file
name.
Use the /LOG qualifier when you specify multiple input and output files
to verify that the files were copied as you intended.
Version Numbers
The following guidelines apply when the target node file formats accept
version numbers.
If no version numbers are specified for input and output files, the
EXCHANGE/NETWORK command (by default) assigns a version number to the
output files that is either of the following:
- The version number of the input file
- A version number one greater than the highest version number of an
existing file with the same file name and file type
When the output file version number is specified by an asterisk (*)
wildcard character, the EXCHANGE/NETWORK command uses the version
numbers of the associated input files as the version numbers of the
output files.
If the output file specification has an explicit version number, the
EXCHANGE/NETWORK command normally uses that number for the output file
specification. However, if an equal or higher version of the output
file already exists, no warning message is issued, the file is copied,
and the version number is set to a value one greater than the highest
version number already existing.
File Protection and Creation/Revision Dates
The EXCHANGE/NETWORK command treats an output file as a new file when
any portion of the output file name is specified explicitly. When the
output node is an OpenVMS system, the creation date for a new file is
set to the current time and date. However, if the output file
specification consists only of the asterisk (*) and the
percent sign (%) wildcard characters, the output file no longer
qualifies as a new file, and, therefore, the creation date of the input
file is used. That is, if the output file specification is one of the
following, the creation date becomes that of the input file: *, *.*, or
*.*;*.
The revision date of the output file is always set to the current time
and date; the backup date is set to zero. The output file is assigned a
new expiration date. (Expiration dates are set by the file system if
retention is enabled; otherwise, they are set to zero.)
When the target node is an OpenVMS node, the protection and access
control list (ACL) of the output file is determined by the following
parameters, in the following order:
- Protection of previously existing versions of the output file
- Default protection and ACL of the output directory
- Process default file protection
For an introduction to ACLs, refer to the HP OpenVMS Guide to System Security.
On OpenVMS systems, the owner of the output file usually is the same as
the creator of the output file. However, if a user with extended
privileges creates the output file, the owner is either the owner of
the parent directory or the owner of a previous version of the output
file, if one exists.
Extended privileges include any of the following:
- SYSPRV (system privilege) or BYPASS
- System user identification code (UIC)
- GRPPRV (group privilege) if the owner of the parent directory (or
previous version of the output file) is in the same group as the
creator of the new output file
- An identifier (with the resource attribute) representing the owner
of the parent directory (or previous version of the output file)