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
 

 

Count the no of records using DFSORT

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

New User


Joined: 09 Jul 2005
Posts: 31
Location: Pune, India

PostPosted: Mon Jan 08, 2007 12:00 pm    Post subject: Count the no of records using DFSORT
Reply with quote

Hi

Can someone let me know how to do this.

Step1. Get the count of number of record in the input file while shorting.
Step2. Pass the number of records to the program in this step using parm.

I am unable to find a way to get the count in a variable which can be passed to the next step.

Prem
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Jan 08, 2007 12:14 pm    Post subject: Re: dfsort count
Reply with quote

Hi Prem,
Pollyannaish wrote:
Step1. Get the count of number of record in the input file while shorting.
Step2. Pass the number of records to the program in this step using parm.
Via the parm, I don't know, but I'd think you could output from sort a file one one small record containing the count of the input. One way might be to, on input add a counting filed of "0000001" and a small constant sort key of, say "X" and sort on the "x" and sum into the count. Same key, only one out, a little reformat on output and that would work. There are probably better ways, wait and see what else pops up.

Bill
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: Mon Jan 08, 2007 11:01 pm    Post subject:
Reply with quote

You can obtain one record with the count using the technique shown in the "Display the number of input or output records" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

You could have the "program" read that record as a data set.
Back to top
View user's profile Send private message
Pollyannaish

New User


Joined: 09 Jul 2005
Posts: 31
Location: Pune, India

PostPosted: Tue Jan 09, 2007 9:59 am    Post subject:
Reply with quote

Thanks Frank and William,

I did it using the method suggested. Still I want if that option could be achieved that way I wanted it to be.
Needs some brainstorming...

Regads,
Prem
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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