Page 1 of 2

counting number of records..

PostPosted: Sun Mar 22, 2009 2:45 pm
by roopesh_vp
HI all,

I have ps with data in teh following format..
user id user name date
22222 aaaaa 12/25/08
33333 bbbbb 12/25/08
44444 ccccc 05/25/08
66666 aatyya 05/25/08
77777 bbbrtr 12/25/08
88888 cccrtt 05/25/08

I want to get the count of records on a particular date using a jcl...

Plz tell how can this be done..

Thanks in advance
roopesh

Re: counting number of records..

PostPosted: Sun Mar 22, 2009 5:46 pm
by dick scherrer
Hello,

Which sort product is used on your system?

Re: counting number of records..

PostPosted: Sun Mar 22, 2009 11:37 pm
by Frank Yaeger
roopesh,

There are many ways to do this kind of thing with DFSORT. You didn't give any details, such as what you want the output to look like, so all I can do is give you an example. Here's a DFSORT/ICETOOL job that will give you a 6-digit count for the number of records with the date '05/25/08'. You could change the job appropriately to get the output in other forms.

//S1   EXEC  PGM=ICETOOL                             
//TOOLMSG   DD  SYSOUT=*                             
//DFSMSG    DD  SYSOUT=*                             
//IN DD *                                             
22222           AAAAA            12/25/08             
33333           BBBBB            12/25/08             
44444           CCCCC            05/25/08             
66666           AATYYA           05/25/08             
77777           BBBRTR           12/25/08             
88888           CCCRTT           05/25/08             
/*
//OUT DD SYSOUT=*                                     
//TOOLIN DD *                                         
COUNT FROM(IN) WRITE(OUT) USING(CTL1) DIGITS(6)       
/*                                                   
//CTL1CNTL DD *                                       
  INCLUDE COND=(34,8,CH,EQ,C'05/25/08')               
/*


For complete details on the COUNT with WRITE function of DFSORT's ICETOOL, see:

http://www.ibm.com/systems/support/stor ... /mvs/ugpf/

Re: counting number of records..

PostPosted: Mon Aug 10, 2009 7:02 pm
by sricsc
Hi Frank,

I need to count the records in the PS file. But in my system, DFSORT utility is not present. Can you tell me how to count the records in ths file ( specifically based on the date ), using any simple utility like sort ?

Input :

73472 2009-08-09
44509 2009-08-09
40614 2009-08-10
40643 2009-08-10
66131 2009-08-10

For eg., i need the output like
No. of records on 2009-08-09 : 07
No. of records on 2009-08-10 : 12

Re: counting number of records..

PostPosted: Mon Aug 10, 2009 9:17 pm
by arcvns
in my system, DFSORT utility is not present
Can you tell me how to count the records in ths file ( specifically based on the date ), using any simple utility like sort ?
Are you saying that you dont have DFSORT; but some other sort product installed in your shop? If you're not sure about this, run the below sort job and check the SYSOUT to see the product and version available in your site.
//STEP1   EXEC PGM=SORT
//SYSOUT    DD SYSOUT=*
//SORTIN    DD *
//SORTOUT   DD SYSOUT=*
//SYSIN     DD *
  OPTION COPY
/*

Re: counting number of records..

PostPosted: Sat Aug 15, 2009 11:54 am
by sricsc
Thanks.. :)

Re: counting number of records..

PostPosted: Sat Aug 15, 2009 10:01 pm
by Frank Yaeger
So which sort product do you have?

Re: counting number of records..

PostPosted: Mon Aug 17, 2009 7:08 pm
by sricsc
Hi Frank,

SYNCSORT utility is installed in my system.

Re: counting number of records..

PostPosted: Mon Aug 17, 2009 10:14 pm
by Frank Yaeger
SYNCSORT utility is installed in my system.


In that case, you'll need somebody else to help you. I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.

Re: counting number of records..

PostPosted: Thu Nov 12, 2009 2:20 pm
by samurai007
Hi ..

I ran that jcl given previously - and found that SYNCSORT is installed on my system.
Does that mean i cant use DFSORT or ICETOOL utilities ??

Thanks,
Sam.