|
View previous topic :: View next topic
|
| Author |
Message |
Skss
New User
Joined: 16 Feb 2010 Posts: 46 Location: India
|
|
|
|
Hi,
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'
structure of input file :
| Code: |
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
|
Structure of output file
| Code: |
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 |
|
| Back to top |
|
 |
Skss
New User
Joined: 16 Feb 2010 Posts: 46 Location: India
|
|
|
|
| Can you provide some resolution to my query on this forum and I will close my new post on the other forum that I have made |
|
| Back to top |
|
 |
Skss
New User
Joined: 16 Feb 2010 Posts: 46 Location: India
|
|
|
|
Akatsukami san!
I see the other post that I have done on your other forum is no longer available.
Can you please respond with a solution to my query on this forum? |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
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. |
|
| Back to top |
|
 |
Skss
New User
Joined: 16 Feb 2010 Posts: 46 Location: India
|
|
|
|
I have tried this
| Code: |
//SORTOUT DD DSN=OUTPUT.REPORT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(30,10),RLSE),
// UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=200,BLKSIZE=)
//SORTWK01 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK02 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK03 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,
HEADER1=(20,C'TEXT FOR HEADING,DATE=(4MD/))
TRAILER1=('END OF REPORT')/,
TRAILER2=(IFTHEN=(WHEN=(2,4,CH,C'ABND'),COUNT)
//*
|
Job abended and here is the abended output
| Code: |
SYSIN :
SORT FIELDS=COPY
OUTFIL REMOVECC,
HEADER1=(20,C'ST REALTIME STATUS REPORT',DATE=(4MD/)),
*
TRAILER1=('END OF REPORT')/,
TRAILER2=(IFTHEN=(WHEN=(2,4,CH,C'ABND'),COUNT)
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
|
It says outfil syntax error
Please suggest |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
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. |
|
| Back to top |
|
 |
Skss
New User
Joined: 16 Feb 2010 Posts: 46 Location: India
|
|
|
|
I got through with Header1
Here is what I have got
| Code: |
//SORTIN DD DISP=SHR,DSN=YYYYYY.YYYYYY.SORT
//SORTOUT DD DSN=XXXXX.XXXXXX.REPORT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(30,10),RLSE),
// UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=200,BLKSIZE=)
//SORTWK01 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK02 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK03 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,
HEADER1=(20:C'TEXT TEXT')
|
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 |
|
| Back to top |
|
 |
Skss
New User
Joined: 16 Feb 2010 Posts: 46 Location: India
|
|
|
|
I have got my solution and even it is working better for what I need
| Code: |
//SORTIN DD DISP=SHR,DSN=XXXXX.Input.SORT
//SORTOUT DD DSN=XXXXX.Output.REPORT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(30,10),RLSE),
// UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=200,BLKSIZE=)
//SORTWK01 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK02 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK03 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,
HEADER1=(20:C'ST TEXT TEXT TEXT TEXT'),
TRAILER1=(01:C'END OF REPORT')
OUTREC IFTHEN=(WHEN=(2,4,CH,EQ,C'ABND'),OVERLAY=(150:C'JOB FAILURE'))
|
|
|
| Back to top |
|
 |
Escapa
Senior Member

Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Hi Skss,
your solution does not seem to be matching your expected output...
In trailer you shown you need count of times job abended and the job name
but your solution does not do that, it just overlay's charactors based on some condition plus header and trailer... |
|
| Back to top |
|
 |
Escapa
Senior Member

Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Also,
Show us sample log with multiple jobs and expected output for same... |
|
| Back to top |
|
 |
Skss
New User
Joined: 16 Feb 2010 Posts: 46 Location: India
|
|
|
|
Escapa,
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. |
|
| Back to top |
|
 |
Escapa
Senior Member

Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
| As asked earlier....show sample log with multiple jobs and expected output. |
|
| Back to top |
|
 |
Skss
New User
Joined: 16 Feb 2010 Posts: 46 Location: India
|
|
|
|
Here is the sample
| Code: |
------JOBNAME--JOBID---ACT-STAT-SYID-------CPU-------I/O-STEP-----PROCSTEP-SWP-WHY-OWNER----SECLABEL-FRAMES-SRVCLASS-PERIOD-WORKLOAD
1 XXXXXX J063010 1151 MPRSCL
IMSY27 J063010 RUNNING 6:03 12/20/2013 TODAY HTF1 YYYYYY 1 3MN CLRT X45676
ABND DFSRRC00 $XXXXXX RETURN CODE NOT AVAILABLE JOB FAILURE
|
and as I have said earlier...... If you have a solution to my intial input then please provide the same.
[/quote] |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

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. |
|
| Back to top |
|
 |
Skss
New User
Joined: 16 Feb 2010 Posts: 46 Location: India
|
|
|
|
Sample with multiple jobs(2 in this case)
| Code: |
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 |
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
| Still no output to match the sample input. |
|
| Back to top |
|
 |
Skss
New User
Joined: 16 Feb 2010 Posts: 46 Location: India
|
|
|
|
| Quote: |
Still no output to match the sample input.
|
What output are you looking for?
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. |
|
| Back to top |
|
 |
Escapa
Senior Member

Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
| Skss wrote: |
| Quote: |
Still no output to match the sample input.
|
What output are you looking for?
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... |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
| Quote: |
| I have already asked Escapa in my previous post that if he needs any further information he can let me know his queries. |
Do Not address your posts to some individual. . .
Your questions should be posted to the forum, not someone. |
|
| Back to top |
|
 |
Skss
New User
Joined: 16 Feb 2010 Posts: 46 Location: India
|
|
|
|
Sample input
| Code: |
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
|
JCL sort step
| Code: |
//STEPXX EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//REPORT1 DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=XXXXXX.INPUT.SORT
//SORTOUT DD DSN=XXXXXX.OUTPUT.REPORT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(30,10),RLSE),
// UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=200,BLKSIZE=)
//SORTWK01 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK02 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SORTWK03 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,
HEADER1=(20:C'TEXT TEXT TEXT'),
TRAILER1=(01:C'END OF REPORT')
OUTREC IFTHEN=(WHEN=(2,4,CH,EQ,C'ABND'),OVERLAY=(150:C'JOB FAILURE'))
|
Output
| Code: |
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 |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|