Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 7315

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

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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
This topic is locked: you cannot edit posts or make replies. Limit access to certain RACF group cvnlynn CLIST & REXX 5 Wed Aug 23, 2017 2:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us