IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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: 7309
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: 7309
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

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top