Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Add Counts to Group Header Records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
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    Post subject: Add Counts to Group Header Records
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Sat Jul 11, 2015 4:14 am    Post subject: Reply to: Add Counts to Group Header Records
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Sat Jul 11, 2015 1:35 pm    Post subject: Reply to: Add Counts to Group Header Records
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    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us