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) 
//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.
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 .