Job to Pull Time Statistics of a Main frame Job from SAR
The following job can be used to fetch time details of a Job from SAR.
//JOBTIME JOB (ACC INFO,,,,,XXXX),’ ‘,CLASS=M, // MSGCLASS=Y,NOTIFY=&SYSUID //STEP01 EXEC PGM=IEFBR14 //DD01 DD DSN=USERID.DATASET.ONE, // DISP=(MOD,DELETE),UNIT=SYSDA //DD02 DD DSN=USERID.DATASET.TWO, // DISP=(MOD,DELETE),UNIT=SYSDA //* //STEP02 EXEC PGM=SARBCH //SYSUDUMP DD SYSOUT=* //SYSPRINT DD SYSOUT=* //TIMDSN DD DSN=USERID.DATASET.ONE, // DISP=(,CATLG,DELETE),UNIT=SYSDA //SYSIN DD *
/DBASE NAME=XXX.XXXXXXX
/PRINT ID=JOBNAME1 DDNAME=TIMDSN PAGE=01 //* //STEP03 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD DSN=USERID.DATASET.ONE,DISP=SHR //SORTOUT DD DSN=USERID.DATASET.TWO, // DISP=(,CATLG,DELETE),UNIT=SYSDA, // DCB=(LRECL=80,RECFM=FB) //SYSIN DD * SORT FIELDS=COPY OUTREC FIELDS(1:33,80),CONVERT INCLUDE COND=(44,14,CH,EQ,C’STARTED – TIME’,OR, 44,12,CH,EQ,C’ENDED – TIME’)
//
Where XXX.XXXXXXX is the name of SAR database. The SAR database for your installation can be found in the main SAR panel where you see the following text
PRIMARY SELECTION FOR XXX.XXXXXXX
and JOBNAME1 is the Jobname for which data needs to be pulled.