Key parameters of the Copy Optical (CPYOPT) command

 

Several parameters must be specified to help you select the files that you want copied.

The parameters include:

You can use CPYOPT to perform a backup of your optical volumes, but it is not the suggested way of doing so. Remember that CPYOPT works on a file basis; therefore, if you are copying a large number of files, your CPYOPT request could take hours to complete. What options you specify can also affect how long your copy request could run. Review the examples later in this topic for a comparison of your options and how they may affect your copy request.

You can use the Select files to copy (SLTFILE) parameter to choose which files you want to copy. Your options are as follows:

If the target volume already contains files, choosing the *CHANGED or *NEW option may result in a longer running CPYOPT request. This is because the system has to make a list of files for both the source and target volume, and then compare them. The time required to do this can become excessive when the volumes contain thousands of files.

You can also use the Copy subdirectories (CPYSUBDIR) parameter to indicate whether or not to process files in the subdirectories of the specified From path. Your options are as follows:

The system uses the FROMTIME parameter to determine if a file is eligible for copying based on its creation or modification date. All files that were created, changed, or whose attributes have changed, on or after the starting date and time are eligible for copying. You can determine when a file was last created or changed by specifying DATA(*FILATR) on the Display Optical (DSPOPT) command. The default values *BEGIN for Starting date and *AVAIL for Starting time, indicate that all files meet the starting date and time requirement. Specifying a starting date and time identifies only files that were created or changed since that date and time as eligible for copying. You can use this parameter to greatly limit the number of files that require processing by CPYOPT. This decreases the time that is required to process the files. You could combine this parameter and the SLTFILE parameter to limit the number of files that need to be checked before copying. You could select only files that were *CHANGED or *NEW after a specified starting date and time.

Here is an example showing how to copy all files from the source volume VOL001 to a volume that currently does not contain any files or directories. The system processes all subdirectories of the source volume, creates the subdirectories on the target volume, and copies all files.

Copy all files form the source volume since the last copy request:

CPYOPT FROMVOL(VOL001) FROMPATH(/) TOVOL(CPYVOL001) + SLTFILE(*ALL) CPYSUBDIR(*YES) CRTDIR(*YES)

For this example you have options that may take different lengths of time.

 

Parent topic:

Copy Optical (CPYOPT) command