Check Optical Volume (CHKOPTVOL)

The Check Optical Volume (CHKOPTVOL) command will validate that all directories and files on the volume can be read. If all directories and file data can be read successfully, the command will complete with no errors and the OUTPUT parameter specified determines whether or not to print a list of files and the number of bytes used. If any directory cannot be successfully read the command will complete in error with no output. If the directories can be read but all file data cannot be read, the command will complete in error and the OUTPUT parameter specified determines whether or not to print a list of damaged files, the number of files that are not damaged, and the number of bytes occupied for each.

Restrictions:

  1. To use this command you must have *USE authority to the authorization list securing the volume.
  2. If this command is being used to check a volume with the Universal Disk Format (UDF), the user must have *RWX authority to the volume root directory.

Parameters

Keyword Description Choices Notes
VOL Volume identifier Character value, *ALL, *MOUNTED Required, Positional 1
OUTPUT Output *ERROR, *NONE, *PRINT Optional, Positional 2
DEV Optical device Name, *ALL Optional, Positional 3

Volume identifier (VOL)

*ALL
All optical volumes in the specified optical device (DEV parameter) are checked.
*MOUNTED
The volume mounted on the specified device (DEV parameter) is checked.

Note: This value is valid only for stand-alone optical devices, not for library devices.

volume-identifier
Specifies the volume identifier of the optical volume to be checked.
generic*-volume-identifier
Specify the generic name of the volume identifier. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name will result in the check of all volumes which begin with the generic prefix and for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete object name.

Output (OUTPUT)

Specifies whether or not the output from the command is printed with the job's spooled output.

*ERROR
Print the list of damaged files to the job's spooled output only if there are any damaged files.
*NONE
The number of damaged files and the number of not damaged files will be in the completion message, but no spooled output file is generated.
*PRINT
Print to the job's spooled output even if there are not any damaged files.

Optical device (DEV)

Specifies the name of the optical device to use for the operation.

*ALL
When the VOL parameter is a specific name or a generic name the names of all of the optical volumes in all of the devices will be compared for a match.
name
When VOL(*MOUNTED) this is the name of the specified optical device. When the VOL(*ALL) all of the volumes in this device will be checked.

Note: This value is valid only when VOL(*ALL) or VOL(*MOUNTED) is specified. Otherwise this parameter is ignored.

Examples

Example 1: Check an Optical Volume

CHKOPTVOL   VOL(VOL01) OUTPUT(*ERROR)

This command checks the directories and files on VOL01. If any damaged files are found the file names are printed to the job's spooled output.

Example 2: Check an Optical Volume and Print the Results to the Job's Spooled Output

CHKOPTVOL   VOL(VOL01) OUTPUT(*PRINT)

This command checks the directories and files on VOL01 and prints a list of damaged files, the number of files that are not damaged, and the number of bytes occupied for each.

Example 3: Check Optical Volumes Using a Generic Volume Identifier

CHKOPTVOL   VOL(PAY*) OUTPUT(*ERROR) DEV(*ALL)

This command checks the directories and files on all volumes in all optical devices that start with PAY. Spooled output created only if error occurs.

Example 4: Check all Optical Volumes in an Optical Media Library

CHKOPTVOL   VOL(*ALL) OUTPUT(*ERROR) DEV(OPTMLB01)

This command checks the directories and files on all volumes in optical media library OPTMLB01.

Error messages

*ESCAPE Messages

OPT0125
Command &1 completed with errors, more information in job log.
OPT1320
Optical volume &1 in use.
OPT1325
Optical volume format not recognized.
OPT1330
Optical volume not found or not useable.
OPT1331
Optical volume &1 not found.
OPT1340
Optical volume &1 not initialized.
OPT1346
Operation not allowed to volume located in a remote optical device.
OPT1460
Optical volume &1 is not in an optical device.
OPT148A
Volume name matching pattern not found.
OPT1515
Unsupported or insufficient configuration on optical device &1.
OPT1530
&1 does not represent a valid optical device.
OPT1542
Operation not supported to optical volume.
OPT1555
Optical device &1 in use.
OPT1605
Media or device error occurred.
OPT1790
Operation not allowed or conflicts with another request.
OPT1805
Error accessing optical volume index file.
OPT1810
Error accessing optical directory index file.
OPT1815
Internal program error occurred.
OPT1820
Internal error occurred on optical device &1.
OPT1821
Error occurred on optical device &1.
OPT1825
Optical indexes are incorrect for optical device &1.
OPT1860
Request to optical device &1 failed.
OPT1861
No device description configured for resource &1.
OPT1862
No active device description for resource &1.
OPT1863
Optical libraries need to be reclaimed.
OPT1864
Insufficient allocated and operational optical drives.
OPT1872
Optical request timed out or was cancelled.
OPT2046
Check Optical Volume completed. &2 damaged files were found.
OPT2051
The check optical volume request for optical volume &1 failed.
OPT2301
Internal system object in use.
OPT2420
Not authorized to optical volume &2.
OPT7740
User not authorized to object &2 in library &3 type &4.