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
 
How to get the count (no of records) sorted

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
kiran_polnati
Warnings : 2

New User


Joined: 23 Jun 2005
Posts: 22

PostPosted: Tue Aug 14, 2007 7:24 pm    Post subject: How to get the count (no of records) sorted
Reply with quote

HI,

I have requirement that how to get the count (no of records) sorted .

sort fields = (1,3,CH,A)

SUM FIELDS = (5,4,ZD) - It will get the summing fields

i need no of records count also
Back to top
View user's profile Send private message

shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Tue Aug 14, 2007 7:37 pm    Post subject:
Reply with quote

Code:
// EXEC PGM=SORT     
//SORTIN DD *       
AAA 1               
AAA 2               
BBB 3               
CCC 4               
CCC 5               
CCC 6               
DDD 7               
DDD 8               
DDD 9               
DDD 10               
DDD 11               
DDD 12               
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *         
 SORT FIELDS=(1,3,CH,A)                                     
 SUM FIELDS=(4,2,ZD)                                       
 OUTFIL TRAILER1=('TOTAL NUMBER OF RECORDS ',COUNT),REMOVECC
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Aug 14, 2007 7:58 pm    Post subject: Re: How to get the count (no of records) sorted
Reply with quote

kiran_polnati wrote:
i need no of records count also

Do you want no. of records to be written in a new data set or in SYSOUT. If in SYSOUT, every DFSORT JOB will have messages of this type:

Code:

ICE054I 0 RECORDS - IN: 5, OUT: 5 


Hope this helps.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Aug 14, 2007 8:49 pm    Post subject:
Reply with quote

Quote:
I have requirement that how to get the count (no of records) sorted .

sort fields = (1,3,CH,A)

SUM FIELDS = (5,4,ZD) - It will get the summing fields

i need no of records count also


Kiran,

Shankar's DFSORT job will give you a count of the output records, that is, the number of records remaining after SUM removes duplicate records. Is that what you want, or do you actually want a count of the number of records sorted before SUM removes duplicate records, or do you not really need the SUM statement at all?

If you need more specific help to get what you want, show an example of your input records and what you expect for output, and give the RECFM and LRECL of your input file.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm

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