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

Count the no of records using DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 3156
Location: Tucson AZ

PostPosted: Mon Jan 08, 2007 12:14 pm
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 Developer


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

PostPosted: Mon Jan 08, 2007 11:01 pm
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:

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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 3
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top