Copy To Directory (CPYTODIR)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Copy To Directory (CPYTODIR) command is used to copy system distribution directory data from a tape or diskette unit to the local system. The directory data that is copied to the local system is created by the Copy From Directory (CPYFRMDIR) command on a remote system. This function allows the local system to begin a directory shadowing environment with the remote system by shadowing changes made to the directory data from the remote system.

Caution: Do not use this command as a backup utility to save and restore directory data for data recovery purposes. Follow the normal backup and recovery procedure guidelines described in the Backup and Recovery book, SC41-5304.

Restriction: You must have security administrator (*SECADM) authority to use this command.

Top

Parameters

Keyword Description Choices Notes
LABEL File label Character value Required, Positional 1
DEV Device Values (up to 4 repetitions): Name Required, Positional 2
AUTOINZ Automatically initialize *YES, *NO Optional
RPLDTA Replace data *YES, *NO Optional
VOL Volume identifier Single values: *NONE
Other values (up to 50 repetitions): Character value
Optional
SEQNBR Sequence number 1-9999, *NEXT Optional
ENDOPT End of tape option *REWIND, *LEAVE, *UNLOAD Optional
Top

File label (LABEL)

Specifies the device file label on the tape or diskette used for the copy operation. A maximum of 17 characters can be specified for tape devices; a maximum of 8 characters can be specified for diskette unit.

This is a required parameter.

Top

Device (DEV)

Specifies the names of the tape or diskette units used for the copy operation. Each tape or diskette unit name must already be known on the system by a device description.

tape-device-name
Specify the names of one or more tape devices used for the copy operation. If more than one tape device is used, specify the names of the devices in the order in which they are used. When more than one tape volume is used, using more than one tape device permits one tape volume to be rewound or unloaded while another tape device processes the next tape volume.
diskette-device-name
Specify the name of the diskette unit to be used for the copy operation.

This is a required parameter.

Top

Automatically initialize (AUTOINZ)

Specifies whether to automatically pass the information copied to this system to other collector systems through directory shadowing.

*YES
The directory entries copied are automatically supplied to collector systems.
*NO
The directory entries copied are not supplied to other collector systems that have already been initialized.
Top

Replace data (RPLDTA)

Specifies whether to replace a directory entry on the local system with directory data copied from tape or diskette.

*NO
Shadowed data is copied from tape or diskette, but directory entries are not replaced with copied directory data if the directory entry exists on the system.
*YES
All directory data is copied from tape or diskette. A directory entry replaces an entry for the same user that already exists on the system.
Top

Volume identifier (VOL)

Specifies one or more volume identifiers used by the file.

*NONE
No volume identifiers are specified for the file. No volume identifiers are checked.
volume-identifier
Specify the identifiers of one or more volumes in the order in which they are placed in a device and used for the copy operation.
Top

Sequence number (SEQNBR)

Specifies the sequence number of the data file on the tape that is processed. The four-position file sequence number is read from the first header label of the data file.

*NEXT
The copy operation begins on the next file on the tape volume. If the tape is currently positioned before the first file, the first file from the tape is processed.
file-sequence-number
Specify the sequence number of the file that is used. Valid values range from 1 through 9999.
Top

End of tape option (ENDOPT)

Specifies the operation that is automatically performed on the tape volume after the operation ends. If more than one volume is included, this parameter applies only to the last tape volume used; all other tape volumes are rewound and unloaded when the end of the tape is reached.

*REWIND
The tape is automatically rewound, but not unloaded, after the operation has ended.
*LEAVE
The tape does not rewind or unload after the operation ends. It remains at the current position on the tape drive.
*UNLOAD
The tape is automatically rewound and unloaded after the operation ends.
Top

Examples

CPYTODIR   DEV(DKT01)  AUTOINZ(*YES)  RPLDTA(*NO)

This command copies all of the directory data from diskette device DKT01 to the local system. Data that is copied to the local system is passed along to other systems that use communications to perform directory shadow initializing or normal directory shadowing. Local system data identified as being the same as diskette data is not replaced.

Top

Error messages

*ESCAPE Messages

CPF90A8
*SECADM special authority required to do requested operation.
CPF90FB
Directory data not copied because of errors.
Top