View previous topic :: View next topic
|
Author |
Message |
Ranjeet.KK
New User
Joined: 30 Oct 2013 Posts: 2 Location: India
|
|
|
|
Hi All,
I need some help. I have a requirement as below.
My input file layout is as below.
UID ACCT_NUM ACCT_TYPE
100 A100 PRIMARY
100 A101 SECONDARY
200 A200 PRIMARY
200 A201 SECONDARY
200 A202 SECONDARY
I Want an output file with the below layout
UID PRI_ACCT_NUM SEC_ACCT_NUM
100 A100 A101
200 A200 A201
200 A200 A202
I can do this through cobol. But can someone please tell me how to do this through JCL?
Thanks,
Ranjeet |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
By JCL you mean your SORT product?
Use IFTHEN=(WHEN=GROUP on your key (or on PRIMARY if you are happy with the integrity of the file). PUSH the value from the primary record to an extended field on all records of that group.
On OUTFIL, INCLUDE only the "SECONDARY" records, and use BUILD to create the data in the format that you want. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Is this a challenge in some contest, that everyone and his cat suddenly wants a solution to this problem? |
|
Back to top |
|
|
Ranjeet.KK
New User
Joined: 30 Oct 2013 Posts: 2 Location: India
|
|
|
|
Thank you so much. I will work on this and get back. |
|
Back to top |
|
|
|