IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Add Counts to Group Header Records


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Christopher Horowitz

New User


Joined: 09 Jul 2015
Posts: 7
Location: United States

PostPosted: Sat Jul 11, 2015 1:21 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Sat Jul 11, 2015 4:14 am
Reply with quote

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
View user's profile Send private message
Christopher Horowitz

New User


Joined: 09 Jul 2015
Posts: 7
Location: United States

PostPosted: Sat Jul 11, 2015 4:28 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Sat Jul 11, 2015 1:35 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> SYNCSORT

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Inserting records into the empty segm... IMS DB/DC 0
No new posts Hexadecimal Group compare and write t... DFSORT/ICETOOL 5
No new posts DB2 group member usage DB2 0
No new posts Group comparison/update between two f... DFSORT/ICETOOL 10
No new posts JCL to extract repeating records DFSORT/ICETOOL 6

Back to Top