HPlogo Using NS 3000/iX Network Services: HP 3000 MPE/iX Computer Systems > Chapter 5 Network File Transfer

Using DSCOPY

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The following notes describe the function of DSCOPY and explain its operation in special situations:

Required Access. Read and lock access is required for any file you want to copy with DSCOPY. If you do not have both read and lock access to the file, DSCOPY will issue a file security violation error message.

Interactive Use. When you enter a DSCOPY command, NFT becomes interactive and displays the prompt DSCOPY. Once the prompt appears, you can issue additional file transfer requests by specifying only source and target filenames and additional options; there is no need to exit the DSCOPY subsystem before requesting additional file transfers.

File Specification Defaults. At NS 3000/iX nodes, the logon and file name specifications are identical to those you usually use at your HP 3000. If a group name is included in the source file specification and the account name is omitted, NFT searches for the group in the logon account. If only a file name is specified (that is, group and account names are omitted) NFT uses the logon group and account.

Special Characters in Logons, File Names or Node Names. If a file name, node name, or logon contains characters that have special significance to either NFT or the source or target node operating systems, you can enclose the name or logon string in quotation marks (" ") so that the name or logon is accepted.

Continuation Lines. If a DSCOPY command is too long to fit on a single line, you can continue to type; DSCOPY will automatically continue the command on the following line. You can also type an ampersand (&) followed by [Return] at the end of a line; this causes the prompt continue to appear, after which you can type the rest of the command.

On-Line HELP. To obtain an on-line description of the DSCOPY command, type ? to the right of the prompt DSCOPY.

Terminating DSCOPY. To terminate the DSCOPY subsystem, type either (1) //[Return] or (2) [CTRL]-Y when a file transfer is not in progress. (Typing [CTRL]-Y when a file transfer is in progress interrupts the file transfer, but does not terminate the subsystem unless the transfer requests originate from a command file.) From a job stream (batch job), the characters // must be used to terminate DSCOPY.

Interrupting a File Transfer. To interrupt a file transfer that is in progress, type [CTRL]-Y. Refer to "Interrupting a File Transfer" later in this chapter for details.

Lockwords. If the sourcefile has a lockword, and the target file is implied, then the targetfile will get the same lockword as the sourcefile. If a targetfile already exists, and you want to give it a new lockword, you must specify the targetfile and its lockword.

Message Files. MPE/iX message files must be transferred in Transparent Format. They will not be copied if Interchange Format is used; thus they can be copied to HP 3000 systems only.

KSAM Files. KSAM file pairs (data files and corresponding key files) can be transferred together as pairs using Transparent Format. Files must be transferred one at a time if Interchange Format is used. (Note: Because Interchange Format causes file characteristics to be lost, KSAM files might be unusable if copied using Interchange Mode.) Using Transparent Format, KSAM file pairs can be specified as source or target files in two ways, as follows:

  • Specify only the name of the data file. In this case, NFT will create both data and target key files; the key file copy will be the same name as the data file copy with the letter "K" appended to it.

  • Specify both data and key files, using the following syntax:

    "datafilename,keyfilename"

The names of the data and key files must be enclosed in quotes.

If either of the target file names specified in a KSAM file transfer already exists, DSCOPY will report an error. To avoid this, you can use the REP option so that the existing file is replaced by the contents of the source file. However, specifying REP will cause to purge the existing KSAM file on the target node before the new file replaces it. If a KSAM file (either data or key file) were open when a system failure occurred, attempts to copy the file with DSCOPY will normally be unsuccessful. However, if the same file or files is copied in a generic transfer (using wildcard characters), no error message will appear, but the target file will be unusable. Refer to the KSAM/3000 Reference Manual for recovery procedures that can be used to make the KSAM files (both source and target) usable.

Requesting Transfers from Files. DSCOPY requests can be issued from command files as well as being issued directly from the keyboard. A command file is an unnumbered text file that contains one or more file transfer requests. Each request in the file must consist of source and target file specifications as well as any desired options. Do not include the word "DSCOPY" in the file.

To issue a DSCOPY request from within a file, you must first issue a file equation equating the formal designator DSCOPYI to the file containing the request.

For example, to have NFT read file transfer requests from the file FILE1, at the MPE/iX prompt, enter:

     FILE DSCOPYI=FILE1

followed by

     DSCOPY

Transfer requests are normally read from the file DSCOPYI, which by default is set to $STDIN(X)— the user's terminal in an interactive session.

NOTE: If any global specification is specified in the DSCOPY command line, DSCOPY will ignore the file equation for DSCOPYI and subsequently enter the DSCOPY subsystem.

Variable Length Records. If a file containing variable length records is copied to an HP 3000 using Interchange Format, the space allocated for the file will be 4 bytes less than the length of the source file rounded up to the nearest multiple of 256 bytes. On an HP 3000, direct access of variable length record files is not allowed. As a result, DSCOPY will return an error if you specify the DIR and VAR options in the same command or if the source file has variable length records and the DIR option is specified but the FIX option is not in effect.

RIO (Relative I/O) Files. DSCOPY will copy RIO files as direct files automatically; you do not need to specify the DIR option to enable direct access to the resulting target file. However, an RIO file will retain its RIO characteristic only if copied to another HP 3000.

Entering MPE/iX Commands. You can enter MPE/iX commands after the DSCOPY prompt by typing a colon (:) followed by the command and [Return].

Job Streams. If the DSCOPY command is used in a job stream (batch job), other MPE/iX commands must not be inserted in the job stream between the DSCOPY command and the // that terminates the DSCOPY subsystem.

Multiple Transfer

Using special "wildcard" characters, you can tell NFT to transfer a generic set of HP 3000 files to another HP 3000. For MPE files (on the HP 3000) these wildcard characters are the same ones used within the MPE/iX file system:

@ — stands for zero or more alphanumeric characters;

# — stands for one numeric character;

? — stands for one alphanumeric character.

When used with DSCOPY, wildcard characters can be used to specify HP 3000 file names only; they cannot be used to specify group or account names. The characters # and ? can be used to specify source file names only. The character @ can be used to specify both source and target file names, but can be used only once, with no other characters surrounding it, to indicate a set of target file names. If wildcards are used to transfer more than one file, and the destination file group and account is explicitly specified, the @ character must be used to specify target file names.

For example, the source file designation E@.PUB.SYS can be used to copy all files in the PUB group of the SYS account whose names begin with E. The source files will be copied to corresponding target files having the same file names as the source files, in the logon group and account. To transfer the same files to a group or account other than the logon group and account, use the @ character to specify the destination file set, as follows: @.group.account. For example, if while logged on to another account you decided to copy the files designated by E@.PUB.SYS to the TST group of the IND account, you could specify the destination file set as @.TST.IND. The resulting target files would have the same names as their corresponding source files but would be located in the TST group of the IND account. When a generic file set is copied, the producer and consumer "negotiate" the transfer of each file. Intermediate results are reported after each transfer. If an error occurs during one of these transfers, an error message is reported.

In an individual file transfer, if you name a target file that already exists, and you do not specify the replace or overwrite option, you will be prompted for further action. (For information on the replace and overwrite options, see the parameter explanations for the DSCOPY command.) In the case of a generic file transfer, however, you will not be prompted. Instead, the transfer attempt will produce an error, and the DSCOPY subsystem will attempt to transfer the next file in the set.

Using Global Specifications

Global specifications, indicated by a + preceding the specification, take effect for all subsequent transfers unless one of the following conditions occurs:

  1. A new global specification that conflicts with the old one is given. For example, if REP is specified globally, it will override and cancel a prior OVER global specification currently in effect.

  2. An item given in an individual, non-global transfer specification conflicts with a previous global specification. This item will override the global specification for this one transfer only.

  3. The CLEAR option is used. This will clear all global specifications currently in effect (not including further specifications on the same line after the CLEAR).

  4. The DSCOPY subsystem is terminated.

All specifications except file names may be made global in this manner. A new SDEV or TDEV specification, or "SDEV=" or "TDEV=" without a device name, clears a previous global source or target device. The only way to clear MOVE, COMP, or QUIET is to use CLEAR.

If all source and target parameters are omitted, or if the command begins with + (global), you will receive a subsystem prompt consisting of the string DSCOPY. (You can also issue global specifications within the subsystem.)

Interrupting a File Transfer

[BREAK] is disabled during a DSCOPY operation. To interrupt a file transfer in progress, type [CTRL]-Y instead.

The DSCOPY subsystem issues a prompt consisting of the word DSCOPY. If you press [CTRL]-Y (or //[Return]) in response to this prompt, the subsystem is terminated. If you enter [CTRL]-Y in response to a continuation prompt (issued when an ampersand on the previous line allows a command to be continued on the next line), the current command is not executed and the DSCOPY prompt is reissued. If [CTRL]-Y interrupts a file transfer, you are prompted for further instructions. The following commands are allowed:

  1. A[BORT] — stops transfer and saves as permanent files new files created during the transfer. Files in the process of transferring that have been partially copied are saved as new target files.

  2. C[ANCEL] — stops transfer. Target files that have already been completely copied during the transfer are saved on the target system. Files whose transfer was incomplete are not saved on the target system.

  3. P[ROGRESS] — causes progress of transfer to be reported.

  4. ? — gives a description of the commands listed above.

If an error or a CANCEL request interrupts a transfer, a newly created file will be purged unless the transfer is complete. If a generic file set is being transferred, those files that have been successfully copied are not purged. In the case of a KSAM file (actually two files, a data file and a key file), the new data file is purged unless its transfer is complete; the new key file is not purged even if its transfer is not complete. If an incomplete key file is created in this way, you should purge it or overwrite it in a subsequent transfer.

Event Recording

DSCOPY produces a listing of user requests and file transfer results (including error messages). This information is sent to a primary file and a secondary file, either of which (or both) may be disabled. The primary file is $STDLIST (the terminal in the case of sessions, the system line printer in the case of streamed jobs). The secondary file is a file or device with the formal designator DSCOPYL.

The QUIET option suppresses all information regarding the success of file transfers except error messages. Primary output to $STDLIST is disabled if the opt parameter of the DSCOPY intrinsic is set to 0,1, or 2; otherwise, primary output is enabled. Secondary output is normally disabled since the secondary file DSCOPYL defaults to $NULL. It will be enabled if a file equation names DSCOPYL as the formal designator of an actual file or device. For example, assume the file is named OUTFILE. Type the following at the MPE/iX prompt:

     FILE DSCOPYL=OUTFILE

If the file does not already exist, you can indicate TEMP or SAVE as the disposition of the file. Otherwise the file will be purged.

     FILE DSCOPYL=OUTFILE,new;TEMP

In the second case NFT will create the file for you, but you must SAVE it to make it permanent.

The NFT facility also sets a number of Job Control Words (JCWs). JCWs are 16-bit values, identified by a name, which are maintained by MPE on a per-job or per-session basis. The JCW named DSCOPY indicates how many files were successfully transferred in the DSCOPY subsystem.

The JCW named NFTERR gives the NFT error code returned after an unsuccessful transfer in an NS 3000/iX network. If a warning has been issued, the "warn" bit of this JCW is set. Bit 2 of this JCW indicates which NS 3000 NFT error message set the error code belongs to: if on, it is the HP 3000-specific error message set; if off, it is the generic NFT error message set.

If a transfer error occurs in a job stream, DSCOPY continues with the next transfer request. However, the abort bit of the system JCW, named JCW, is set. As a result, the job will fail after the DSCOPY subsystem is exited unless a CONTINUE command has been specified.

Feedback to webmaster