My requirement is to build a sort card which will do the following this for me
1) Header starting from position 30 with system date starting from position 60
2) Trailer1 notifying the 'end of report'.
3) Trailer2 with a specific text count(text is 'ABND' which has a starting position of 2 in the input file and has a length of 4)
3) Trailer3 notifying the abended(ABND) jobs if any. If none found then report it with text 'NONE'
Header Date
Job name
------JOBNAME--JOBID---ACT-STAT-SYID-------CPU-------I/O-STEP-----
1 XXXXXXX J061847 YYYY
<--RC--PGM--------STEP-----PRSTEP---PROC-----COMMENTS
0 PGMSTEP $XXXXXX
ABND SORT
Trailer
Abend count : 1
Abended Job : XXXXXXX
Just to give you a breif info about the input file content:
The input contains the data read from IOF(interface to view job log in my shop)
30 to 40 jobs log will be written into the dataset. So need to check for abends if any.
Some more info
The RECL for both input & output file is 133
I need 3 lines of trailer records
If there are multiple abends then I need to list them all(i;e : Job1 Job2)
My shop uses SYNCSORT
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Skss,
Use OUTFIL with HEADER1 and TRAILER1. The TRAILER1 can output multiple lines (three in your case) using the Slash Operator (/).
Get something basic working. You will probably need some IFTHENs. Possibly WHEN=GROUP. There are many examples on the sites you have posted the question to, which show you many ways to utilise what you need..
Give it a go. Produce something. If you get stuck, come back and show what you've done.
If you can't get it and you post again, you need to show better sample data. If a file can contain multiple JOB data, show multiple. If multiple abends. show. If multiple normal completions, show.
Show them on the input, and show the expected output.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
OK, click on the link for the forum the post is in (JCL). In the Search box for the forum, type HEADER1 and search. Look at some examples of HEADER1 and you'll see what is wrong.
You are confusing yourself by using TRAILER1 and TRAILER2 in that way. Just use TRAILER1 with multiple lines (separate with / to note the start of a new line).
You can't put conditions in TRAILER2 (or any HEADERn/TRAILERn) anyway. You can use conditions on OUTFIL.
Have you got SyncSort documentation? If not, get it, look at it first before just trying something. It can be hard to just "guess" syntax, and there is no need with the wealth of examples available and your own documentation.
But I am unable to figure out what should be done for the outfil and Trailer.
I have gone through some of the examples from earlier posts but could not figure out much help from those.
Please help to figure out the logic for outfil and trailer
This is an alternate solution
I understand it does not match my initial input but as I did not get much help so I found this way to identify the the jobs that abend.
If you have a solution to my intial input then please provide the same.
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
The reason you did not receive the help you wanted earlier and will probably be frustrated again is because your descriptions have not been very useful. You also do not post what is requested. . .
Quote:
As asked earlier....show sample log with multiple jobs and expected output.
The most recent "stuff" you posted does not appear to show multiple input jobs and does not show the expected output from these multiple jobs.
How much time should the helpers waste working on this when you do not provide what is requested. It does not matter if You believe the info is needed. Humor the helper that asks for info help you.
If the task cannot be clearly defined, it cannot be implemented.
IOF XXXXXX
------JOBNAME--JOBID---ACT-STAT-SYID-------CPU-------I/O-STEP-----PROCSTEP-SWP-WHY-OWNER----SECLABEL-FRAMES-SRVCLASS-PERIOD-WORKLOAD
1 XXXXXX J063010 1151 MPRSCL
XXXXXX J063010 RUNNING 6:03 12/20/2013 TODAY HTF1 MPRSCL 1 3MN CLRT X45676
ABND DFSRRC00 $XXXXXX RETURN CODE NOT AVAILABLE JOB FAILURE
-------DDNAME---STEP-----PRSTEP---STAT-ACT-C-GRP-D-SIZE-U-DEST---------------FORMS----COPIES-PAGEDF-FORMDF-ADR-SECLABEL-OWNER-------
1 LOG * J 4 L NO MPRSCL
2 JCL * J 68 L NO MPRSCL
3 MESSAGES * J NO MPRSCL
4 CEEDUMP $XXXXXX J NO MPRSCL
5 SYSOUT $XXXXXX J NO MPRSCL
6 SYSUDUMP $XXXXXX D NO MPRSCL
J E S 2 J O B L O G -- ************ -- N O D E H T F 1
06.03.22 J0063010 ---- ******** DEC 2013 ----
06.03.22 J0063010 UJVJBSWA STMT# 0001 SWA=ABOVE REQUESTED
06.03.23 J0063010 ICH70001I MPRSCL LAST ACCESS AT 06:03:21 ON FRIDAY, DECEMBER 20, 2013
06.03.23 J0063010 $HASP373 IMSY27 STARTED - INIT JJ - CLASS 3 - SYS 1151
06.03.23 J0063010 IEFUSI-I JOB:IMSY27 STEP:$XXXXXX PGM=DFSRRC00 REGION=0K WAS SPECIFIED
06.03.23 J0063010 IEF403I XXXXXX - STARTED
06.03.24 J0063010 +DFS0578I - READ SUCCESSFUL FOR DDNAME PROCLIB MEMBER = DFSINTLE H1SY
06.03.24 J0063010 +DFS0578I - READ SUCCESSFUL FOR DDNAME PROCLIB MEMBER = DFSMPLSL H1SY
06.03.25 J0063010 +DFS670I IMSY27.$IMSY27. - MODULES HAVE BEEN PRE-LOADED H1SY
06.03.25 J0063010 +DFS667I . NON-REENTRENT MODULES HAVE BEEN PRELOADED H1SY
++++ Bottom of Data Set +++
IOF IYYYYYY
------JOBNAME--JOBID---ACT-STAT-SYID-------CPU-------I/O-STEP-----PROCSTEP-SWP-WHY-OWNER----SECLABEL-FRAMES-SRVCLASS-PERIOD-WORKLOAD
1 YYYYYY J063012 1151 MPRSCL
YYYYYY J063012 RUNNING 6:03 12/20/2013 TODAY HTF1 MPRSCL 1 3MN CLRT X45676
ABND DFSRRC00 $YYYYYY RETURN CODE NOT AVAILABLE JOB FAILURE
-------DDNAME---STEP-----PRSTEP---STAT-ACT-C-GRP-D-SIZE-U-DEST---------------FORMS----COPIES-PAGEDF-FORMDF-ADR-SECLABEL-OWNER-------
1 LOG * J 4 L NO MPRSCL
2 JCL * J 68 L NO MPRSCL
3 MESSAGES * J NO MPRSCL
4 CEEDUMP $YYYYYY J NO MPRSCL
5 SYSOUT $YYYYYY J NO MPRSCL
6 SYSUDUMP $YYYYYY D NO MPRSCL
Escapa......let me know if you have a solution for my initial post
Do also let me know if you are looking for any more information
I have already asked Escapa in my previous post that if he needs any further information he can let me know his queries.
Please understand that I am not reluctant in sharing any kind of information that I already have which is pertinent to this post
The more I try to respond to the queries posted for me, the more I get confused with the responses I get from various different folks rather than coming from who initially posted the question.
I have already asked Escapa in my previous post that if he needs any further information he can let me know his queries.
Please understand that I am not reluctant in sharing any kind of information that I already have which is pertinent to this post
The more I try to respond to the queries posted for me, the more I get confused with the responses I get from various different folks rather than coming from who initially posted the question.
Kss,
Nic simply means for input you have just shown, post expected output for same input...
IOF XXXXXX
------JOBNAME--JOBID---ACT-STAT-SYID-------CPU-------I/O-STEP-----PROCSTEP-SWP-WHY-OWNER----SECLABEL-FRAMES-SRVCLASS-PERIOD-WORKLOAD
1 XXXXXX J063010 1151 MPRSCL
XXXXXX J063010 RUNNING 6:03 12/20/2013 TODAY HTF1 MPRSCL 1 3MN CLRT X45676
ABND DFSRRC00 $XXXXXX RETURN CODE NOT AVAILABLE
-------DDNAME---STEP-----PRSTEP---STAT-ACT-C-GRP-D-SIZE-U-DEST---------------FORMS----COPIES-PAGEDF-FORMDF-ADR-SECLABEL-OWNER-------
1 LOG * J 4 L NO MPRSCL
2 JCL * J 68 L NO MPRSCL
3 MESSAGES * J NO MPRSCL
4 CEEDUMP $XXXXXX J NO MPRSCL
5 SYSOUT $XXXXXX J NO MPRSCL
6 SYSUDUMP $XXXXXX D NO MPRSCL
J E S 2 J O B L O G -- ************ -- N O D E H T F 1
06.03.22 J0063010 ---- ******** DEC 2013 ----
06.03.22 J0063010 UJVJBSWA STMT# 0001 SWA=ABOVE REQUESTED
06.03.23 J0063010 ICH70001I MPRSCL LAST ACCESS AT 06:03:21 ON FRIDAY, DECEMBER 20, 2013
06.03.23 J0063010 $HASP373 IMSY27 STARTED - INIT JJ - CLASS 3 - SYS 1151
06.03.23 J0063010 IEFUSI-I JOB:IMSY27 STEP:$XXXXXX PGM=DFSRRC00 REGION=0K WAS SPECIFIED
06.03.23 J0063010 IEF403I XXXXXX - STARTED
06.03.24 J0063010 +DFS0578I - READ SUCCESSFUL FOR DDNAME PROCLIB MEMBER = DFSINTLE H1SY
06.03.24 J0063010 +DFS0578I - READ SUCCESSFUL FOR DDNAME PROCLIB MEMBER = DFSMPLSL H1SY
06.03.25 J0063010 +DFS670I IMSY27.$IMSY27. - MODULES HAVE BEEN PRE-LOADED H1SY
06.03.25 J0063010 +DFS667I . NON-REENTRENT MODULES HAVE BEEN PRELOADED H1SY
++++ Bottom of Data Set +++
IOF IYYYYYY
------JOBNAME--JOBID---ACT-STAT-SYID-------CPU-------I/O-STEP-----PROCSTEP-SWP-WHY-OWNER----SECLABEL-FRAMES-SRVCLASS-PERIOD-WORKLOAD
1 YYYYYY J063012 1151 MPRSCL
YYYYYY J063012 RUNNING 6:03 12/20/2013 TODAY HTF1 MPRSCL 1 3MN CLRT X45676
ABND DFSRRC00 $YYYYYY RETURN CODE NOT AVAILABLE
-------DDNAME---STEP-----PRSTEP---STAT-ACT-C-GRP-D-SIZE-U-DEST---------------FORMS----COPIES-PAGEDF-FORMDF-ADR-SECLABEL-OWNER-------
1 LOG * J 4 L NO MPRSCL
2 JCL * J 68 L NO MPRSCL
3 MESSAGES * J NO MPRSCL
4 CEEDUMP $YYYYYY J NO MPRSCL
5 SYSOUT $YYYYYY J NO MPRSCL
6 SYSUDUMP $YYYYYY D NO MPRSCL
TEXT TEXT TEXT TEXT
IOF XXXXXX
------JOBNAME--JOBID---ACT-STAT-SYID-------CPU-------I/O-STEP-----PROCSTEP-SWP-WHY-OWNER----SECLABEL-FRAMES-SRVCLASS-PERIOD-WORKLOAD
1 XXXXXX J063010 1151 MPRSCL
XXXXXX J063010 RUNNING 6:03 12/20/2013 TODAY HTF1 MPRSCL 1 3MN CLRT X45676
ABND DFSRRC00 $XXXXXX RETURN CODE NOT AVAILABLE JOB FAILURE
-------DDNAME---STEP-----PRSTEP---STAT-ACT-C-GRP-D-SIZE-U-DEST---------------FORMS----COPIES-PAGEDF-FORMDF-ADR-SECLABEL-OWNER-------
1 LOG * J 4 L NO MPRSCL
2 JCL * J 68 L NO MPRSCL
3 MESSAGES * J NO MPRSCL
4 CEEDUMP $XXXXXX J NO MPRSCL
5 SYSOUT $XXXXXX J NO MPRSCL
6 SYSUDUMP $XXXXXX D NO MPRSCL
J E S 2 J O B L O G -- ************ -- N O D E H T F 1
06.03.22 J0063010 ---- ******** DEC 2013 ----
06.03.22 J0063010 UJVJBSWA STMT# 0001 SWA=ABOVE REQUESTED
06.03.23 J0063010 ICH70001I MPRSCL LAST ACCESS AT 06:03:21 ON FRIDAY, DECEMBER 20, 2013
06.03.23 J0063010 $HASP373 IMSY27 STARTED - INIT JJ - CLASS 3 - SYS 1151
06.03.23 J0063010 IEFUSI-I JOB:IMSY27 STEP:$XXXXXX PGM=DFSRRC00 REGION=0K WAS SPECIFIED
06.03.23 J0063010 IEF403I XXXXXX - STARTED
06.03.24 J0063010 +DFS0578I - READ SUCCESSFUL FOR DDNAME PROCLIB MEMBER = DFSINTLE H1SY
06.03.24 J0063010 +DFS0578I - READ SUCCESSFUL FOR DDNAME PROCLIB MEMBER = DFSMPLSL H1SY
06.03.25 J0063010 +DFS670I IMSY27.$IMSY27. - MODULES HAVE BEEN PRE-LOADED H1SY
06.03.25 J0063010 +DFS667I . NON-REENTRENT MODULES HAVE BEEN PRELOADED H1SY
++++ Bottom of Data Set +++
IOF IYYYYYY
------JOBNAME--JOBID---ACT-STAT-SYID-------CPU-------I/O-STEP-----PROCSTEP-SWP-WHY-OWNER----SECLABEL-FRAMES-SRVCLASS-PERIOD-WORKLOAD
1 YYYYYY J063012 1151 MPRSCL
YYYYYY J063012 RUNNING 6:03 12/20/2013 TODAY HTF1 MPRSCL 1 3MN CLRT X45676
ABND DFSRRC00 $YYYYYY RETURN CODE NOT AVAILABLE JOB FAILURE
-------DDNAME---STEP-----PRSTEP---STAT-ACT-C-GRP-D-SIZE-U-DEST---------------FORMS----COPIES-PAGEDF-FORMDF-ADR-SECLABEL-OWNER-------
1 LOG * J 4 L NO MPRSCL
2 JCL * J 68 L NO MPRSCL
3 MESSAGES * J NO MPRSCL
4 CEEDUMP $YYYYYY J NO MPRSCL
5 SYSOUT $YYYYYY J NO MPRSCL
6 SYSUDUMP $YYYYYY D NO MPRSCL
END OF REPORT
Let me know if anyone has any further questions for me