You can use batch jobs to define MGMT classes and to specify the EXPIRE AFTER time (in days).
Currently, other mainframe MGMTCLAS properties are not supported.
You can use a TSO-like command executed with the IKJEFT01 utility to save, view and delete MGMTCLAS values.
The following is an example of using the MGMTCLAS utility:
//ISDCS01 JOB 'COPY01',CLASS=A,MSGCLASS=A //*------------------------------------------------------------------ //STEP30 EXEC PGM=IKJEFT01 //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSTSIN DD * %SMS MGMTCLAS NAME(YYYY) EXPIREAFTER(000365) FUNC(ISRT) %SMS MGMTCLAS NAME(YYYY) EXPIRENOUSE(000014) FUNC(ISRT) %SMS MGMTCLAS NAME(XXXX) RETLIM(000200) FUNC(ISRT) //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //
You can use MGMTCLAS with the following parameters:
You can use the MGMTCLAS parameter on the DD statement to catalog a new dataset in JCL. For example:
//DEF EXEC PGM=IEFBR14 //DEF1 DD DSN=TEST.MCLAS,DISP=(NEW,CATLG), // MGMTCLAS=(XXXX),UNIT=SYSDA
In this example, JCL uses the EXPIREAFTER value associated with the MGMTCLAS to calculate an expiry date for the dataset. This is held on the catalog and can be used by any catalog maintenance utilities to expire old datasets.
The MGMTCLAS utility includes a DATACLAS maintenance function.
You can use the %SMS command to maintain DATACLAS - for example:
%SMS DATACLAS NAME(ABC) RECFM(FB) LRECL(80) FUNC(ISRT)
Where the DATACLAS parameters that this example uses are:
Other properties of DATACLAS that you can use are: AVREC, AVVALUE, BLKSIZE, DIRECTORY, DSORG, KEYLEN, KEYOFF, LRECL, NAME, PRIMARY, RECFM, RECORG and SECONDARY .
If a value is given for EXPIRENOUSE it is added to the last change date for the dataset and if that is less than the current date then the dataset is marked as expired and can be uncataloged and deleted. If no value has been set for EXPIRENOUSE but a value has been set for EXPIREAFTER then that value is checked against the current date, and if that is less than the current date, the dataset is marked as expired and can be uncataloged and deleted. See Catalog Maintenance for more information.