need to Count number of records



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

need to Count number of records

Postby Chaitnya » Tue Apr 22, 2008 9:34 am

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
Chaitnya
 
Posts: 18
Joined: Wed Mar 26, 2008 1:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: need to Count number of records

Postby dick scherrer » Tue Apr 22, 2008 11:16 am

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                                 
/*                     
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: need to Count number of records

Postby Chaitnya » Fri Apr 25, 2008 7:06 am

Thanks!!! Dick, it works.... :D
Chaitnya
 
Posts: 18
Joined: Wed Mar 26, 2008 1:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: need to Count number of records

Postby dick scherrer » Fri Apr 25, 2008 7:10 am

You're welcome - thank you for posting that you have a solution :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post