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
 

 

Syncsort - Count of different record types in a file using

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
bhairon singh rathore

New User


Joined: 19 Jun 2008
Posts: 91
Location: banglore

PostPosted: Fri May 27, 2011 3:44 pm    Post subject: Syncsort - Count of different record types in a file using
Reply with quote

I have a file (Record length 50 bytes) which has around 600,000 records with six different record types (Indicated by first 10 bytes alphanumeric). I want to get the count for each record type in output file through syncsort (I just need the counts).
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri May 27, 2011 3:57 pm    Post subject:
Reply with quote

What have you done for yourself about this. Quite a frequently asked question.

Why not append a 1 as column 51 using inrec and then sort and sum on the key fields. Plenty of examples of that or similar on the forum.

Just a basic suggestion, but I'm sure that others will be more than happy to do your job for you icon_sad.gif
Back to top
View user's profile Send private message
bhairon singh rathore

New User


Joined: 19 Jun 2008
Posts: 91
Location: banglore

PostPosted: Fri May 27, 2011 4:02 pm    Post subject:
Reply with quote

Can you just give me a link which has such example . I'm new to syncsort.

Thanks
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7254

PostPosted: Fri May 27, 2011 4:05 pm    Post subject:
Reply with quote

There are lots of Syncsort examples in the JCL forum, and presumably you have access to the manual. If you look back through the forum and find something likely looking (even try the search box for the forum) and then ensure that you understand/find something exact in the manual.
Back to top
View user's profile Send private message
bhairon singh rathore

New User


Joined: 19 Jun 2008
Posts: 91
Location: banglore

PostPosted: Fri May 27, 2011 4:19 pm    Post subject:
Reply with quote

Hi Below is jcl to find count for all records

//SORT1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Input.File,DISP=SHR
//SORTOUT DD DSN=Output.File,...
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=OUT,TRAILER1=(1:COUNT),REMOVECC,NODETAIL
/*

Please let me know, how to modify it to get count for different records as per first 10 byte in input file
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Sun May 29, 2011 7:49 pm    Post subject:
Reply with quote

bhairon singh rathore,

Search for examples in this forum with keywords as "SECTION" or "TRAILER3". I am sure you'll find many working examples here.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon May 30, 2011 8:23 am    Post subject:
Reply with quote

Hi,

my preference for this is
Code:
//STEP0001 EXEC  PGM=ICETOOL                       
//TOOLMSG  DD SYSOUT=*                             
//DFSMSG   DD SYSOUT=*                             
//IN       DD DSN=input-file                       
//OUT      DD SYSOUT=*                             
//TOOLIN   DD *                                   
 OCCURS FROM(IN) LIST(OUT) NOHEADER -             
 ON(1,10,CH) ON(VALCNT,E'99999') BLANK             
/*                                                 



Gerry
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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