I need to create a report for mainframe batch jobs and the last run for each job.
I have the following,
REPORT
HISTFILE HIST1
INPUT FILE(GDGHIST)
SETWIDTH 80
CRITERIA JOBNAME EQ 'VBW-' AND WOBTYPE EQ ' ' AND TASK EQ 'NO' ;
FROM JUN 01, 2020 00:00:01 TO JUN 30, 2020 07:59:59
DATEFORM DAY(NO)
DISPLAY FULLNAME 15, -
JOBNO, -
CCFAIL, -
CMPC, -
EXECSDATE, -
EXECST, -
ENDDATE, -
ENDT
SORT EXECSDATE,EXECST,ENDDATE,ENDT
ENDR
What can I add to get just the last run for each job. There are about 1,000,000 jobs that need to be reduced to just the last occurrance for each job.
Release : 11.4 & 12.0
Component : CA ESP WORKLOAD AUTOMATION
ESP history report feature doesn't have a way to display only the last run of the same job.
One way around:
Add FULLNAME to be the first SORT field, and BREAK to make is easier to locate. Like below:
SORT FULLNAME,EXECSDATE,EXECST,ENDDATE,ENDT
BREAK FULLNAME 64 SPACE 1
Then in the report output, entries will be sorted by JOB's full name, and there is a blank line for every JOB.
Note: Client decides to collect the data to put them into DB2 database or EXCEL file.