View previous topic :: View next topic
|
Author |
Message |
bhairon singh rathore
New User
Joined: 19 Jun 2008 Posts: 91 Location: banglore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
Back to top |
|
|
bhairon singh rathore
New User
Joined: 19 Jun 2008 Posts: 91 Location: banglore
|
|
|
|
Can you just give me a link which has such example . I'm new to syncsort.
Thanks |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
bhairon singh rathore
New User
Joined: 19 Jun 2008 Posts: 91 Location: banglore
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
|