VMS Help EXCHANGE, /NETWORK *Conan The Librarian (sorry for the slow response - running on an old VAX) |
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
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.
2 - Qualifiers |
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.
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, refer to the OpenVMS User's Manual or the online help topic DCL_Tips (subtopic Date_Time).
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 OpenVMS Guide to System Security.
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.
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.
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.
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.
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, refer to 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.
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)
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.
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, 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, refer to the OpenVMS User's Manual or the online help topic DCL_Tips (subtopic Date_Time).
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. Refer to the OpenVMS Guide to Extended File Specifications for more information.
2.13 - /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.
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, refer to 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.
|