//*--------------------------------------------------------------------
//*-------------------------->> RACFCMD1 <<----------------------------
//*--------------------------------------------------------------------
//*                         RACF COMMANDS
//*
//*  IMPORTANT:  Copy member JOBCARD to the beginning of this job.
//*
//*  THIS JOB EXECUTES MULTIPLE RACF COMMANDS AND SAVES THE OUTPUT IN
//*  INDIVIDUAL PDS MEMBERS.
//*
//*  STEP01:          REMOVES PREVIOUS RUNS DATASETS
//*  STEP10:          ALLOCATE PDS TO HOLD OUTPUT FROM RACF COMMANDS.
//*  STEP11 - STEP56: EACH STEP RUNS A BATCH TMP, EXECUTES RACF
//*                   COMMAND(S), AND STORES THE OUTPUT IN AN
//*                   INDIVIDUAL PDS MEMBER.
//*
//*  ===> NOTE:       A STEP CONDITION CODE OF 4 TYPICALLY INDICATES
//*                   THAT NO INFORMATION WAS AVAILABLE (E.G. LIST
//*                   RESOURCES OF A CLASS THAT IS NOT ACTIVE OR NO
//*                   PROFILES ARE DEFINED TO A CLASS THAT IS ACTIVE).
//*
//*                   RACF COMMAND ERROR MESSAGES WILL BE LOCATED IN
//*                   THE PDS MEMBERS USED TO HOLD COMMAND OUTPUT.
//*
//*                   REVIEW ALL PDS MEMBERS TO ENSURE PROPER
//*                   EXECUTION.
//*--------------------------------------------------------------------
//*
//STEP01   EXEC PGM=IEFBR14
//RACFCMDS DD DSN=&SRRHLQ..RACFCMDS.RPT,
//            DISP=(MOD,DELETE,DELETE),
//            SPACE=(TRK,0),UNIT=SYSDA
//IRRDBU00 DD DSN=&SRRHLQ..IRRDBU00,
//            DISP=(MOD,DELETE,DELETE),
//            SPACE=(TRK,0),UNIT=SYSDA
//*
//STEP10   EXEC  PGM=IEFBR14
//RACFDSN  DD DSN=&SRRHLQ..RACFCMDS.RPT,
//            DISP=(,CATLG,DELETE),
//            DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=27920),
//            SPACE=(CYL,(20,20,10)),
//            UNIT=(SYSDA,1)
//*
//*--------------------------------------------------------------------
//*      BATCH TMP TO EXECUTE RACF COMMANDS (INSTREAM PROCEDURE)
//*--------------------------------------------------------------------
//*
//RACFCMDS PROC
//BATCHTMP EXEC  PGM=IKJEFT01,DYNAMNBR=20
//SYSLBC   DD  DSN=SYS1.BRODCAST,DISP=SHR
// PEND
//*
//STEP11   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(SETROPTS),
//            DISP=SHR
//SYSTSIN  DD  *
 SETROPTS LIST
/*
//STEP12   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(PROGRAM),
//            DISP=SHR
//SYSTSIN  DD  *
 RLIST PROGRAM * ALL
/*
//STEP13   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(LISTUSER),
//            DISP=SHR
//SYSTSIN  DD  *
 LISTUSER * TSO DFP OMVS CICS OPERPARM DCE NETVIEW
/*
//STEP14   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(SYSDSN),
//            DISP=SHR
//SYSTSIN  DD  *
 LISTDSD PREFIX(SYS) AUTHUSER
/*
//STEP15   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(LISTGRP),
//            DISP=SHR
//SYSTSIN  DD  *
 LISTGRP * DFP OMVS
/*
//STEP16   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(JESINPUT),
//            DISP=SHR
//SYSTSIN  DD  *
 RLIST JESINPUT * ALL
/*
//STEP17   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(DASDVOL),
//            DISP=SHR
//SYSTSIN  DD  *
 RLIST DASDVOL * ALL
/*
//STEP18   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(GDASDVOL),
//            DISP=SHR
//SYSTSIN  DD  *
 RLIST GDASDVOL * ALL
/*
//STEP19   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(FACILITY),
//            DISP=SHR
//SYSTSIN  DD  *
 RLIST FACILITY * ALL
/*
//STEP20   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(SURROGAT),
//            DISP=SHR
//SYSTSIN  DD  *
 RLIST SURROGAT * ALL
/*
//STEP21   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(UNIXPRIV),
//            DISP=SHR
//SYSTSIN  DD  *
 RLIST UNIXPRIV * ALL
/*
//STEP22   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(DATASET),
//            DISP=SHR
//SYSTSIN  DD  *
 SR NOMASK CLASS(DATASET) CLIST('LD DA(' ') GEN ALL')
 EXEC EXEC.RACF.CLIST
/*
//STEP23   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(TSOAUTH),
//            DISP=SHR
//SYSTSIN  DD  *
 RLIST TSOAUTH * ALL
/*
//STEP24   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(PROPCNTL),
//            DISP=SHR
//SYSTSIN  DD  *
 RLIST PROPCNTL * ALL
/*
//STEP25   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(TSOPROC),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST TSOPROC * ALL
/*
//STEP26   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(CA@MD),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST CA@MD * ALL
/*
//STEP27   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(CA@APE),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST CA@APE * ALL
/*
//STEP28   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(CONSOLE),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST CONSOLE * ALL
/*
//STEP29   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(OPERCMDS),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST OPERCMDS * ALL
/*
//STEP30   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(TCICSTRN),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST TCICSTRN * ALL
/*
//STEP31   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(GCICSTRN),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST GCICSTRN * ALL
/*
//STEP32   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(APPL),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST APPL * ALL
/*
//STEP33   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(DIGTNMAP),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST DIGTNMAP * ALL
/*
//STEP34   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(WRITER),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST WRITER * ALL
/*
//STEP35   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(JESSPOOL),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST JESSPOOL * ALL
/*
//STEP36   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(MQADMIN),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST MQADMIN * ALL
/*
//STEP37   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(MQCONN),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST MQCONN * ALL
/*
//STEP38   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(MQQUEUE),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST MQQUEUE * ALL
/*
//STEP39   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(MQPROC),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST MQPROC * ALL
/*
//STEP40   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(MQNLIST),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST MQNLIST * ALL
/*
//STEP41   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(MQCMDS),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST MQCMDS * ALL
/*
//STEP42   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT($IOA),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST $IOA * ALL
/*
//STEP43   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(LGT),
//             DISP=SHR
//SYSTSIN  DD  *
 LISTGRP *
/*
//STEP44   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(FS),
//            DISP=SHR
//SYSTSIN  DD  *
 LISTDSD PREFIX(SYS) AUTHUSER
/*
//STEP45   EXEC  RACFCMDS
//SYSTSPRT DD DSN=&SRRHLQ..RACFCMDS.RPT(FT),
//            DISP=SHR
//SYSTSIN  DD  *
 SR NOMASK CLASS(DATASET) CLIST('LD DA(' ') GEN ALL')
 EXEC EXEC.RACF.CLIST
/*
//STEP46   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(SERVAUTH),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST SERVAUTH * ALL
/*
//STEP47   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(CBIND),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST CBIND * ALL
/*
//STEP48   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(SDSF),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST SDSF * ALL
/*
//STEP49   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(MXADMIN),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST MXADMIN * ALL
/*
//STEP50   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(MXQUEUE),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST MXQUEUE * ALL
/*
//STEP51   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(MXPROC),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST MXPROC * ALL
/*
//STEP52   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(MXNLIST),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST MXNLIST * ALL
/*
//STEP53   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(MXTOPIC),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST MXTOPIC * ALL
/*
//STEP54   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(CDT),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST CDT * ALL
/*
//STEP55   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(CCICSCMD),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST CCICSCMD * ALL
/*
//STEP56   EXEC  RACFCMDS
//SYSTSPRT DD  DSN=&SRRHLQ..RACFCMDS.RPT(VCICSCMD),
//             DISP=SHR
//SYSTSIN  DD  *
 RLIST VCICSCMD * ALL
/*
//STEP57    EXEC PGM=IRRUT200
//SYSRACF   DD DSN=SYS1.RACF,DISP=SHR
//SYSUT1    DD DSN=&&RACF,
//             DISP=(,PASS,DELETE),
//             UNIT=3390,SPACE=(CYL,(20,10)),
//             DCB=(LRECL=4096,RECFM=FB,DSORG=PS)
//SYSUT2    DD SYSOUT=*
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD     *
    INDEX
    MAP
    END
/*
//STEP58   EXEC PGM=IRRDBU00,PARM='NOLOCKINPUT'
//SYSPRINT DD SYSOUT=*
//INDD1    DD DISP=SHR,DSN=&&RACF
//OUTDD    DD DSN=&SRRHLQ..IRRDBU00,
//            DISP=(NEW,CATLG,DELETE),
//            DCB=(LRECL=4096,RECFM=FB,DSORG=PS),
//            UNIT=3390,SPACE=(CYL,(10,5),,CONTIG)
//STEP59   EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=4096K
//SYSEXEC  DD DSN=&SRRHLQ..CNTL,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//REXOUT   DD DSN=&SRRHLQ..RACFCMDS.RPT(CERTRPT),
//            DISP=SHR
//DBUFILE  DD DSN=&SRRHLQ..IRRDBU00,DISP=SHR
//SYSTSIN  DD *
 %REXCRTS
/*
//
