Page 1 of 1

need to Count number of records

PostPosted: Tue Apr 22, 2008 9:34 am
by Chaitnya
Hi

I need to calculate number of records in a dataset by running a JCL. Can any one let me know the JCL

Thanks in advanced

Re: need to Count number of records

PostPosted: Tue Apr 22, 2008 11:16 am
by dick scherrer
Hello,

Try this:
//COUNT  EXEC PGM=ICETOOL                                           
//TOOLMSG  DD  SYSOUT=*                                                 
//DFSMSG   DD  SYSOUT=*                                                 
//DD01     DD  DSN=FILE_NAME,                                     
//             DISP=SHR                                                 
//TOOLIN   DD  *                                                       
   COUNT FROM(DD01)                                                     
/*           


or this:
//COUNT   EXEC PGM=FILEAID,REGION=6M         
//STEPLIB  DD  DISP=SHR,DSN=YOUR.FILEAID.LINKLIB
//SYSPRINT DD  SYSOUT=*                       
//SYSLIST  DD  SYSOUT=*                       
//DD01     DD  DSN=FILE_NAME,       
//             DISP=SHR                       
//*                                           
//SYSIN    DD *                               
$$DD01 TALLY                                 
/*                     

Re: need to Count number of records

PostPosted: Fri Apr 25, 2008 7:06 am
by Chaitnya
Thanks!!! Dick, it works.... :D

Re: need to Count number of records

PostPosted: Fri Apr 25, 2008 7:10 am
by dick scherrer
You're welcome - thank you for posting that you have a solution :)

d