Copy From Directory (CPYFRMDIR)

The Copy From Directory (CPYFRMDIR) command is used to copy system distribution directory data from the local system to a tape or diskette unit. This directory data can then be copied to other remote systems by using the Copy To Directory (CPYTODIR) command on the remote systems. This function allows the remote system to begin a directory shadowing environment with the local system by shadowing changes made to the directory data from the local 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 Recovering your system book, SC41-5304.

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

Parameters

Keyword Description Choices Notes
LABEL File label Character value Required, Positional 1
DEV Device Values (up to 4 repetitions): Name Required, Positional 2
SYSNAME System name Values (up to 50 repetitions): Character value Optional
VOL Volume identifier Single values: *NONE
Other values (up to 50 repetitions): Character value
Optional
SEQNBR Sequence number 1-9999, *END Optional
ENDOPT End of tape option *REWIND, *LEAVE, *UNLOAD Optional
EXPDATE File expiration date Date, *PERM Optional

File label (LABEL)

Specifies the name that identifies the device file label on the tape or diskette to be copied. A maximum of 17 characters can be specified for tape devices and 8 characters for diskette units.

This is a required parameter.

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.

diskette-device-name
Specify the name of the diskette unit to be used for the copy operation.
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.

This is a required parameter.

System name (SYSNAME)

Specifies the names of the remote systems that copy the system distribution directory data from the tapes or diskettes created by this command. The names of the remote systems on this parameter are added to the list of system names that are collecting changes to directory data from the local system.

Note: You must include the names of all the remote systems that use the tapes or diskettes created by this command to ensure that all changes to directory data are sent to the remote systems during a normal shadowing session.

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.

Sequence number (SEQNBR)

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

*END
The copy operation begins after the last sequence number on the tape volume.
file-sequence-number
Specify the sequence number of the file that is used. Valid values range from 0001 through 9999.

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.

File expiration date (EXPDATE)

Specifies the expiration date. The files cannot be overwritten until the expiration date. The expiration date must be later than or equal to the current date.

*PERM
The data file is permanently protected. An expiration date of 999999 is assigned.
expiration-date
Specify the date when protection for the file ends.

Examples

CPYFRMDIR   DEV(TAP01)  SYSNAME(CHICAGO NEWYORK)

This command copies all of the directory data from the local system to tape device TAP01. CHICAGO and NEWYORK are added to the list of systems that collect changes to the directory data from the local system.

Error messages

*ESCAPE Messages

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