Previous Topic: TMSCOPY Report Field DefinitionsNext Topic: Special Considerations


TMSCTLG Utility—Remove Tapes from Catalog Control

Note: The functionality of this utility has been incorporated into TMSCLEAN. However, if all systems sharing the TMC have not been upgraded to r5.2 or higher and the TMSOSCAT utility with a PARM=SYNC has not been run on all systems sharing the TMC; this utility should still be used.

Once all systems sharing the TMC have been upgraded to r5.2 or higher and the TMSOSCAT utility with a PARM=SYNC has been run on all systems sharing the TMC; the OCTLG control statement (in the TMOOPTxx member of CTAPOPTNS) can be set to N and this utility no longer needs to be executed.

TMSCTLG resets the expiration date in the TMC for all volumes under Catalog Control (CATALOG or CATLG in control statements and online interfaces, or LABEL=EXPDT=99000, or ACCODE=xCACATLG in JCL) that no longer have corresponding entries in the system catalog. The date is set to the current system date plus any catalog extension (defined by option R9 in the TMOOPTxx member of hlq.CTAPOPTN). If the tape has multiple files and a secondary file has an expiration date value higher than this calculated date, the higher expiration date value is used.

For multifile tapes, the volume set will remain protected as long as any file in the volume set still exists on the system catalog. Secondary files are expired by Catalog Control once it is determined that a corresponding entry does not exist on the system catalog. When no entries remain on the system catalog for all files in the volume set, the expiration date is reset in the Volume record for File 1.

To protect long-running tape jobs, a two-day minimum hold limit exists for tapes under Catalog Control. Because CA 1 sets the expiration date at tape OPEN and the system does not post the entry to the system catalog until step termination, it is possible that, during the execution of TMSCTLG, a tape that is still on the drive could appear to be eligible for expiration.

To avoid the premature scratching of tapes under these circumstances, TMSCTLG checks first to see if the volume has been cataloged. (The X'80' bit is turned on in FLAG2.) The r5.2 or higher realtime catalog interface will turn on the X'80' bit in Flag 2 as soon as the tape is cataloged in the OS Catalog. If not, TMSCTLG keeps the tape for two days from its creation date (CDATE). DSNBs are kept for two days from their CDATE even if uncataloged.

Catalog Days Control (CATLG/ddd in control statements and online interfaces, or LABEL=EXPDT=90ddd in JCL) can be used to control the amount of time to wait before TMSCTLG will process the data set. Catalog Days Control specifies that the data set is retained for ddd days. Once ddd days have passed (calculated as CDATE plus the ddd value), TMSCLEAN will automatically change the expiration date of the data set to CATALOG, allowing subsequent runs of TMSCTLG to process the data set.

TMSCTLG should be executed before TMSCLEAN to determine the scratch eligibility of tapes under Catalog Control.

CA 1 must be active or batch active to run this utility.

TMSCTLG operates in one of the following modes:

OS Catalog Mode

To run TMSCTLG in the OS catalog mode, all system catalog(s) must be available to the system on which TMSCTLG is run. A LOCATE is issued to determine the status of the tape data set in the system catalog. This applies to File 1 data sets and secondary data sets. The information returned by LOCATE determines whether the tape data set is still under Catalog Control or needs to be expired by Catalog Control.

If all catalogs are not available to the system on which TMSCTLG is executed, then this mode of operation should not be used. Data sets which have CATALOG as their expiration date may be prematurely expired.

If TMSCTLG is run in the OS catalog mode, then it is the only required step for Catalog Control processing. OS catalog mode is the default in the provided JCL member JOBCTLG, and is controlled by the absence of the JCL DDNAME VWORK.

IDCAMS Listing Mode

This mode of operation for TMSCTLG is available for multi-CPU installations in which system catalog(s) are not accessible to the CPU on which TMSCTLG is executed. IDCAMS listings are provided from all system catalogs for tape data sets, including the system on which TMSCTLG is executed. Data set information, such as data set name, file sequence, volume sequence, and media type, is extracted, sorted, and written to a VSAM data set in a separate procedure prior to executing TMSCTLG. Once this VSAM file (defined by the JCL DDNAME VWORK) is created, it is used to determine if a data set is still cataloged on any system catalog. This includes File 1 data sets and secondary data sets. LOCATEs are not performed in this mode.

To help ensure all IDCAMS listings are provided to the listing extract job CTSLSTEX as subsequent input to the TMSCTLG step as the VWORK VSAM file, Catalog Listing Verification can be performed. Catalog Listing Verification takes a list of expected system catalog data set names, defined in the SYSIN DDNAME JCL statement, and verifies that the VSAM VWORK data set contains entries from those system catalogs. If any system catalog data set coded in SYSIN is not found or is available but does not contain any tape data sets, TMSCTLG will terminate with a condition code of 12. This eliminates the accidental exclusion of a system catalog IDCAMS listing to CTSLSTEX. If the SYSIN DDNAME JCL is not present, Catalog Verification is bypassed. If you do not want to do Catalog Verification, do not code //SYSIN DD DUMMY. This type of coding will result in a condition code 12 and a verification error.

If Listing mode is chosen for Catalog Control processing, it requires three steps. The first step is to run either IDCAMS on each system which contains a system catalog that may have tape data sets cataloged. After listings have been obtained from all system catalogs needed, the listing data sets are used as input to the second step.

The second step is a procedure which first executes CTSLSTEX to extract data set information from the IDCAMS listing files then sorts and creates the VSAM data set. The provided JCL for this step is in hlq.CTAPJCL member TMSLSTEX.

The third step in the Listing mode procedure is execution of TMSCTLG, using the VSAM data set created in the second step. This VSAM data is defined by the JCL DDNAME VWORK. Optionally, SYSIN can be used to provide the list of expected catalog names for Catalog Listing Verification.