View previous topic :: View next topic
|
Author |
Message |
ramas.kamal
New User
Joined: 03 Mar 2014 Posts: 22 Location: India
|
|
|
|
Hi, I have a file with LRECL=80,RECFM=FB and want to find no.of occurrences based on three fields.
Input:
Code: |
4784311500001008 5160 1500
4784311500001016 5160 1000
4784311500001024 5160 1200
4784311500001032 7007 0500
4784311500001040 7007 1500
4784311500001057 7007 1500
4784311500001065 7007 2500
|
Output:
Code: |
4784 500 500 1
4784 500 1000 1
4784 500 1200 1
4784 500 1500 3
4784 500 2500 1
|
I tried below code and got this output.
Code: |
//STEP0001 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//SSMSG DD SYSOUT=*
//IN DD *
4784311500001008 5160 1500
4784311500001016 5160 1000
4784311500001024 5160 1200
4784311500001032 7007 0500
4784311500001040 7007 1500
4784311500001057 7007 1500
4784311500001065 7007 2500
//RPT DD SYSOUT=*
//TOOLIN DD *
OCCUR FROM(IN) LIST(RPT) NOHEADER BLANK -
ON(1,4,ZD) ON(8,3,ZD) ON(23,4,ZD) ON(VALCNT)
|
I request you to help me to get below shown "Expected Output". This output needs to have "DAILYCYCLE OUTGOING" at 1st column and "present date" at 44th column.
Expected Output:
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7
DAILYCYCLE OUTGOING 4784 500 500 20140416 1
DAILYCYCLE OUTGOING 4784 500 1000 20140416 1
DAILYCYCLE OUTGOING 4784 500 1200 20140416 1
DAILYCYCLE OUTGOING 4784 500 1500 20140416 3
DAILYCYCLE OUTGOING 4784 500 2500 20140416 1
|
What do I need to add to the TOOLIN? Please help.
Thanks. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Either get those in the heading, or re-write using SORT with OUTFIL. |
|
Back to top |
|
|
ramas.kamal
New User
Joined: 03 Mar 2014 Posts: 22 Location: India
|
|
|
|
Bill, thanks for idea ! |
|
Back to top |
|
|
|