Following are some sample SMSAUDIT jobs which show typical uses of SMSAUDIT.
Compare SCDS to ACTIVE
The following JCL shows a simple SMSAUDIT job used to compare an SCDS to the currently active configuration. All constructs and attributes are compared.
//AUDIT EXEC PGM=SMSAUDIT
//SYSPRINT DD SYSOUT=*
//SUMMARY DD SYSOUT=*
//SYSIN DD *
COMPARE CDS1(ACTIVE) -
CDS2(DTS.S0W1.SCDS)
Compare SCDS to SCDS with construct type filter
- Data Classes
- Storage Classes
- Management Classes
- Storage Groups
//AUDIT EXEC PGM=SMSAUDIT
//SYSPRINT DD SYSOUT=*
//SUMMARY DD SYSOUT=*
//SYSIN DD *
COMPARE CDS1(DTS.NEW.SCDS) -
CDS2(DTS.S0W1.SCDS) -
CONSTRUCTS(DC,SC,MC,SG)
Compare a single construct
The following job shows a comparison of a single Data Class in the current SCDS to the same data class in another SCDS.
//AUDIT EXEC PGM=SMSAUDIT
//SYSPRINT DD SYSOUT=*
//SUMMARY DD SYSOUT=*
//SYSIN DD *
COMPARE CDS1(DTS.NEW.SCDS) -
CDS2(DTS.S0W1.SCDS) -
CONSTRUCTS(DC) -
NAME1(DATA1) -
NAME2(DATA1)
Compare Differently-Named constructs
CDS1 and CDS2. //AUDIT EXEC PGM=SMSAUDIT
//SYSPRINT DD SYSOUT=*
//SUMMARY DD SYSOUT=*
//SYSIN DD *
COMPARE CDS1(DTS.NEW.SCDS) -
CDS2(DTS.S0W1.SCDS) -
CONSTRUCTS(MC) -
NAME1(MGMT1) -
NAME2(MGMT2)
Write an SMF History Record
In this example, a single CDS is specified and an SMF record is written for each construct in an SCDS. If a job like this is run just prior to the activation of the configuration, an SMS configuration history can be maintained. This can be useful in determining which constructs were changed, when they were changed, and which userid made the change.
//AUDIT EXEC PGM=SMSAUDIT
//SYSPRINT DD SYSOUT=*
//SUMMARY DD SYSOUT=*
//SYSIN DD *
COMPARE CDS1(DTS.NEW.SCDS) -
SMFRID(222)