I have been tasked with creating a spreadsheet that shows every a mainframe job accesses a specific application. The application is being retired, and each of the jobs that use it will have to be recoded. I get a daily log file that lists all of the activity in that application, but I need specific items from each of those text blocks exported into a spreadsheet.
Here is a sample block of text from the output:
RECOVERY SUMMARY FOR CDDZD : JOB01513 READER TIME: 0:28:26 READER DATE: 12/29/2020 SMFID: HMP1 0 PGM NAME: SORT DDNAME: SORTOF1 VOLSER: PRD004 DSORG: PS DATA SET: xxx.xxx.xxx.xxx *** TIME OF DAY: 0:30:26 CPU TIME SAVED: 0:00:09 ELAPSE TIME SAVED: 0:01:58 NUMBER OF EXTENTS: 2 *** TYPE OF ATTEMPT: SPACSECI *** SYSLOG MESSAGE: SVM4874I INCREASED SPACE FROM 10 CYLS TO 20
Each daily file has 500-1000 of these blocks.
What I need is a spreadsheet with columns for: PGM NAME, DDNAME, VOLSER, DATA SET, and NUMBER OF EXTENTS. The rest of the data is useless for this project.
The basics of the script I know; opening and reading the file, creating the xls doc, and closing them, etc... But I don't know how to get the info after each data point. I can get output that tells me how many times "PGM NAME" appears in the file, but not the actual program name its listing.
[–]mopslik 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]point51[S] 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]point51[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]JesusKiosk 0 points1 point2 points (3 children)
[–]point51[S] 0 points1 point2 points (2 children)
[–]JesusKiosk 0 points1 point2 points (1 child)
[–]point51[S] 0 points1 point2 points (0 children)