//DIALOGDS SET DIALOG=&SRRHLQ..DATA         <<---- CHANGE TO DIALOG DS
//FSOJCL    JCLLIB ORDER=(&SRRHLQ..CNTL,
//             &SRRHLQ..TEMP2)
//*--------------------------------------------------------------------
//*-------------------------->> CARJ0002 <<----------------------------
//*--------------------------------------------------------------------
//*                      GENERATE CA REPORTS
//*
//*  IMPORTANT:  Copy member JOBCARD to the beginning of this job.
//*
//*  THIS JOB EXECUTES NUMEROUS CLIST AND EDIT MACROS TO GENERATE
//*  A REPORT OF ACCESSES OF SYSTEM LIBRARIES/FILES.
//*
//*  STEP1:           REMOVES DATASETS FROM PREVIOUS RUN
//*  STEP2:           CREATES RACFCMDS.RPT MEMBERS FROM MEMBER
//*                   RACFSPL CREATED IN TEMP2.
//*
//*  STEP3:           READS RACFCMDS.RPT MEMBERS GENERATED FROM DSN
//*                   COLLECTION JOB AND CREATES FORMATTED RECORDS.
//*
//*  STEP4:           PROCESSES RECORDS FROM STEP3 AND COLLECTS
//*                   ADDITIONAL INFORMATION FOR DETAILED REPORT.
//*
//*  STEP5:           PROCESSES RECORDS FROM STEP4 TO GENERATE
//*                   SENSITVE.RPT MEMBERS FOR DATASET ACCESS.
//*
//*  STEP6:           PROCESSES RECORDS FROM STEP4 TO GENERATE
//*                   SENSITVE.RPT MEMBERS FOR RESOURCE ACCESS.
//*
//*  STEP7:           CREATES PDI FINDINGS FROM DATA SET CHECKS
//*
//*  ===> NOTE:  STEP2, STEP3, STEP4, STEP5, STEP6 AND STEP7 MAY END
//*              WITH A CONDITION CODE OF 0 ALTHOUGH ERRORS OCCURRED.
//*              REVIEW THE ISPLOG AND SYSTSPRT FILES OF EACH REPORT
//*              STEP, ALONG WITH THE JOBLOG OR JESLOG FILES, FOR
//*              ERROR MESSAGES AND TO ENSURE SUCCESSFUL EXECUTION.
//*--------------------------------------------------------------------
//*
//*
//*
//STEP1    EXEC PGM=IEFBR14
//TEMP4    DD DISP=(MOD,DELETE,DELETE),
//            SPACE=(TRK,0),UNIT=SYSALLDA,
//            DSN=&SRRHLQ..TEMP4
//TEMP5    DD DISP=(MOD,DELETE,DELETE),
//            SPACE=(TRK,0),UNIT=SYSALLDA,
//            DSN=&SRRHLQ..TEMP5
//TEMP6    DD DISP=(MOD,DELETE,DELETE),
//            SPACE=(TRK,0),UNIT=SYSALLDA,
//            DSN=&SRRHLQ..TEMP6
//AUACCESS DD DISP=(MOD,DELETE,DELETE),
//            SPACE=(TRK,0),UNIT=SYSALLDA,
//            DSN=&SRRHLQ..AUACCESS
//SENS     DD DISP=(MOD,DELETE,DELETE),
//            SPACE=(TRK,0),UNIT=SYSALLDA,
//            DSN=&SRRHLQ..SENSITVE.RPT
//*
//*
//RACFSPL   PROC
//BATCHTMP  EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSPROC  DD DISP=SHR,DSN=&SRRHLQ..CNTL
// PEND
//*
//RACFCMDS  PROC HLQINP=,HLQOUT=
// INCLUDE MEMBER=RACFSPL
// INCLUDE MEMBER=RACFRSC
// PEND
//*
//STEP2     EXEC RACFCMDS,
//             HLQINP=&SRRHLQ,        TEMP2
//             HLQOUT=&SRRHLQ         RACFCMDS
//*
//*
//STEP3     EXEC EXAMRPTS,
//             CNTL=&SRRHLQ..CNTL
//CNTL      DD DSN=&SRRHLQ..TABLE,
//             DISP=SHR
//          DD DSN=&SRRHLQ..CNTL,
//             DISP=SHR
//RACFRPT   DD DSN=&SRRHLQ..RACFCMDS.RPT,
//             DISP=OLD
//TEMP4     DD DSN=&SRRHLQ..TEMP4,
//             DISP=(NEW,CATLG,DELETE),
//*            DATACLAS=ALLOCX1V,   <--- Use if SMS rule applies
//             UNIT=(SYSDA,1),
//             SPACE=(CYL,(50,10,30)),
//             DCB=(RECFM=FB,LRECL=133,BLKSIZE=27930,DSORG=PO)
//SYSTSIN   DD *
  ISPSTART CMD(%CARC0002 TERMMSGS(ON))
/*
//*
//STEP4     EXEC EXAMRPTS,
//             CNTL=&SRRHLQ..CNTL
//CNTL      DD DSN=&SRRHLQ..TABLE,
//             DISP=SHR
//          DD DSN=&SRRHLQ..CNTL,
//             DISP=SHR
//RACFRPT   DD DSN=&SRRHLQ..RACFCMDS.RPT,
//             DISP=OLD
//TEMP4     DD DSN=&SRRHLQ..TEMP4,
//             DISP=OLD
//TEMP5     DD DSN=&SRRHLQ..TEMP5,
//             DISP=(NEW,CATLG,DELETE),
//*            DATACLAS=ALLOCX1V,   <--- Use if SMS rule applies
//             UNIT=(SYSDA,1),
//             SPACE=(CYL,(50,10,30)),
//             DCB=(RECFM=FB,LRECL=133,BLKSIZE=27930,DSORG=PO)
//SYSTSIN   DD *
  ISPSTART CMD(%CARC0003 TERMMSGS(ON))
/*
//*
//STEP5     EXEC EXAMRPTS,
//             CNTL=&SRRHLQ..CNTL
//CNTL      DD DSN=&SRRHLQ..TABLE,
//             DISP=SHR
//          DD DSN=&SRRHLQ..CNTL,
//             DISP=SHR
//DIALOG    DD DSN=&DIALOG,
//             DISP=SHR
//RACFRPT   DD DSN=&SRRHLQ..RACFCMDS.RPT,
//             DISP=OLD
//AUACCESS  DD DSN=&SRRHLQ..AUACCESS,
//             DISP=(NEW,CATLG,DELETE),
//*            DATACLAS=ALLOCX1V,   <--- Use if SMS rule applies
//             UNIT=SYSDA,
//             SPACE=(TRK,(45,15,30)),
//             DCB=(RECFM=FB,LRECL=32,BLKSIZE=27968,DSORG=PO)
//SENSITVE  DD DSN=&SRRHLQ..SENSITVE.RPT,
//             DISP=(NEW,CATLG,DELETE),
//*            DATACLAS=ALLOCX1V,   <--- Use if SMS rule applies
//             UNIT=(SYSDA,1),
//             SPACE=(CYL,(50,25,30)),
//             DCB=(RECFM=FB,LRECL=133,BLKSIZE=27930,DSORG=PO)
//TEMP5     DD DSN=&SRRHLQ..TEMP5,
//             DISP=OLD
//TEMP6     DD DSN=&SRRHLQ..TEMP6,
//             DISP=(NEW,CATLG,DELETE),
//*            DATACLAS=ALLOCX1V,   <--- Use if SMS rule applies
//             UNIT=(SYSDA,1),
//             SPACE=(CYL,(50,10,30)),
//             DCB=(RECFM=VB,LRECL=300,BLKSIZE=27930,DSORG=PO)
//SYSTSIN   DD *
  ISPSTART CMD(%CARC0420 TERMMSGS(ON))
/*
//STEP6     EXEC EXAMRPTS,
//             CNTL=&SRRHLQ..CNTL
//CNTL      DD DSN=&SRRHLQ..CNTL,
//             DISP=SHR
//TEMP5     DD DSN=&SRRHLQ..TEMP5,
//             DISP=OLD
//SENSITVE  DD DSN=&SRRHLQ..SENSITVE.RPT,
//             DISP=OLD
//SYSTSIN   DD *
  ISPSTART CMD(%CARC0004 TERMMSGS(ON))
/*
//STEP7     EXEC EXAMRPTS,
//             CNTL=&SRRHLQ..CNTL
//CNTL      DD DSN=&SRRHLQ..TABLE,
//             DISP=SHR
//          DD DSN=&SRRHLQ..CNTL,
//             DISP=SHR
//PDIDD     DD DSN=&SRRHLQ..PDI,
//             DISP=OLD
//SENSITVE  DD DSN=&SRRHLQ..SENSITVE.RPT,
//             DISP=SHR
//TEMP6     DD DSN=&SRRHLQ..TEMP6,
//             DISP=SHR
//SYSTSIN   DD *
  ISPSTART CMD(%CARC0421 TERMMSGS(ON))
//
