WRKOPTF (Work with Optical Files)

WRKOPTF Command syntax diagram

 

Purpose

The Work with Optical Files (WRKOPTF) command displays a list of optical files on the system and provides options to copy, to delete, to rename and to display or print a list of optical files and their attributes.

 

Restrictions

  1. To use this command have *USE authority to the authorization list securing the volume containing the optical files.
  2. If this command is issued for an optical volume which is in a remote optical server, only the following can be specified:
    DIR(optical-directory-name)
    FILE(*ALL)
    FILE(file-name)
    FILE(generic*-file-name)

 

Required Parameters

VOL
Specifies the identifier of the optical volume that contains the files to be listed.

DIR
Specifies the path name of the optical directory that contains the files specified to be listed, beginning with the root directory of the volume.

*ALL: All directories on the specified optical volume are listed. If DIR(*ALL) is specified, only optical files contained in the root directory are listed.

directory-name: Specify the path name of a directory, beginning with the root directory of the volume.

 

Optional Parameters

FILE
Specifies the name of the file to be listed.

*ALL: All files in the specified directory are listed.

*SELECT: The files in the range specified on the SLTFILE parameter are listed.

Note: This value is ignored for volumes in remote optical servers.

file-name: Specify the name of a file.

generic*-file-name: Specify the generic name of the file you want to work with. 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 specifies all objects with names that begin with the generic prefix 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. See generic names for additional information.

SLTFILE
Specifies the range of files to be listed.

 

Notes

  1. This parameter is valid only if FILE(*SELECT) is specified and is ignored if the optical volume was initialized as a backup volume.
  2. This parameter is not valid for remote optical servers.

Element 1: From File

*ALL: All files in the specified directory are selected.

from-file: Specify the name of the first file in the name range to be selected.

generic*-file-name: Specify the generic name of the optical files to be selected.

Element 2: To File

to-file: Specify the name of the last file in the name range.

Note: This value is ignored when the from-file value is *ALL or generic*.

SLTDATE
Specifies the date and the time range of the files to be selected.

 

Notes

  1. This parameter is valid only if FILE(*SELECT) is specified and is ignored if the optical volume was initialized as a backup volume.
  2. This parameter is not valid for remote optical servers.

Element 1: Date Type

*CREATED: The files are selected by the dates on which they were created.

*MODIFIED: The files are selected by the dates on which they were changed.

Element 2: Starting Time and Date

*AVAIL: The time range includes all possible times before the end time.

start-time: Specify the earliest time in the time range.

*BEGIN: The date of the oldest file is the starting date.

start-date: Specify the earliest date in the date range.

Element 3: Ending Time and Date

*AVAIL: The time range includes all times after the starting time.

end-time: Specify the last time in the time range.

*END: The date of the newest file is the ending date.

end-date: Specify the last date in the date range.

Examples of WRKOPTF

Example 1: Displaying Optical Files in a Root Directory

WRKOPTF   VOL(VOL01)  DIR(*ALL)

This command displays a list of all optical files in the root directory on the optical volume VOL01.

Example 2: Displaying Optical Files in a Specific Directory

WRKOPTF   VOL(VOL02)  DIR('/DIR1')  FILE(*ALL)

This command displays a list of all optical files in the directory DIR1 on the optical volume VOL02.

Example 3: Displaying Optical Files Created on Specific Dates

WRKOPTF   VOL(VOL03)  DIR('/DIR2')  FILE(*SELECT)
  SLTFILE(*ALL)  SLTDATE(*CREATED('12:01:00' '1/1/94')
  ('23:59:59' '12/31/94'))

This command displays a list of all optical files in the directory DIR2 on the volume VOL03 created between 12:01:00 on January 1, 1994 and 23:59:59 on December 31, 1994.

Error messages for WRKOPTF

*ESCAPE Messages

OPT0159
Beginning selection is greater then ending selection.
OPT1115
File not found.
OPT1205
Directory not found.
OPT1212
Directory in use.
OPT1220
File or directory name already exists.
OPT1224
Path length exceeds the maximum of 256 bytes.
OPT1317
Directory name is too long.
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.
OPT1360
Media directory corrupted on optical volume &1.
OPT1460
Optical volume &1 is not in an optical device.
OPT1463
Operation not completed, optical volume is not a primary volume.
OPT1489
Volume parameter is not permitted for device &1.
OPT1530
&1 does not represent a valid optical device.
OPT1555
Optical device &1 in use.
OPT1605
Media or device error occurred.
OPT1640
Error occurred reading files or directories.
OPT1790
Operation 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
Internal 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.
OPT1872
Optical request timed out.
OPT2301
Internal system object in use.
OPT7740
User not authorized to object &2 in library &3 type &4.