View previous topic :: View next topic
|
Author |
Message |
Christopher Horowitz
New User
Joined: 09 Jul 2015 Posts: 7 Location: United States
|
|
|
|
Hi,
I have an 80 byte FB input file that has numerous groups (number of groups varies). Each group has a header and a trailer. I want to put the number of records in each group on the group header record. I've seen it done for a single file header, and I've seen it done for group trailers, but I can't figure out how to do it for group headers.
Input:
Code: |
CHD 000001801
23232 12345-0001
23232 12345-0002
CFT 000001801
CHD 000773322
56565 11122-0001
56565 11122-0002
56565 11122-0003
56565 11122-0004
CFT 000773322
|
Desired output:
Code: |
CHD 000001801 00000002
23232 12345-0001
23232 12345-0002
CFT 000001801
CHD 000773322 00000004
56565 11122-0001
56565 11122-0002
56565 11122-0003
56565 11122-0004
CFT 000773322
|
I apologize in advance if this looks familiar. I mistakenly posted this in the DFSORT forum earlier today. Rather than further the folly there, I just started over here. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
As long as your SyncSORT is fairly up-to-date, the same approach should work (even though the JNFnCNTL files may not be documented). |
|
Back to top |
|
|
Christopher Horowitz
New User
Joined: 09 Jul 2015 Posts: 7 Location: United States
|
|
|
|
It wasn't recognizing the parameters you specified for JNF1CNTL.
I appreciate very much your responding. I haven't done much in syncsort to this point. Quite an update to my education. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If you can post the full sysout from the failed step, we can see the version you have and what exactly was wrong.
If you don't have access to the JNFnCNTL files, then it is a three-step process. Step1, doing the processing that would be done in JNF1CNTL, Step2 doing the processing that would be done in JNF2CNTL and then Step3 being the JOINKEYS itself. |
|
Back to top |
|
|
|