Using SMS MGMT Classes

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.

MGMTCLAS maintenance utility

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:

%SMS
Invokes the SMS maintenance program.
MGMTCLAS
Accesses the MGTCLASS maintenance routines.
NAME
The name of the MGMTCLAS. This must be between one to eight characters long.
EXPIREAFTER
The number of days after which the dataset expires.
EXPIRENOUSE
The dataset expires after a number of days of no use.
RETLIM
The number of days until the dataset expires.[2]
FUNC
A function to use for the MGMTCLAS. The available functions are:
DLET
Deletes the specified MGMTCLAS. Requires the NAME parameter.
GN
Gets the next MGMYCLAS record. Requires a pervious GU or STN< parameter.
GU
Retrieves the specified MGMTCLAS. Requires the NAME parameter.
ISRT
Inserts the specified MGMTCLAS. Requires the NAME and EXPIREAFTER parameters.
STN<
Starts not less than. Positions on the first MGMTCLAS not less than the specified NAME to set position for subsequent get next.

Using the MGMTCLAS maintenance utility in JCL

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.

DATACLAS maintenance for the MGMTCLAS utility

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:

NAME
The name of the DATACLAS to be accessed. This is ABC in this example.
RECFM
A property of DATACLAS. This is FB in this example.

Other properties of DATACLAS that you can use are: AVREC, AVVALUE, BLKSIZE, DIRECTORY, DSORG, KEYLEN, KEYOFF, LRECL, NAME, PRIMARY, RECFM, RECORG and SECONDARY .

The MGMTCLAS values are evaluated when the MFCATMNT utility is run

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.

Note: The allocation override file also accepts both MGMTCLASS and EXPIRE attributes. See Format of the Rules File for more information.