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

Syncsort - Count of different record types in a file using


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Fri May 27, 2011 3:57 pm
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
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

Moderator Emeritus


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

PostPosted: Fri May 27, 2011 4:05 pm
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
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: 2481
Location: @my desk

PostPosted: Sun May 29, 2011 7:49 pm
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: 1702
Location: Australia

PostPosted: Mon May 30, 2011 8:23 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top