How to count the number of records



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

How to count the number of records

Postby Nisha » Wed Jun 04, 2008 11:35 am

Hi,
I have to count the number of records in an output file using JCL.

Regards,
Nisha
Nisha
 
Posts: 5
Joined: Wed Jun 04, 2008 11:26 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to count the number of records

Postby jayind » Wed Jun 04, 2008 1:23 pm

Is this count for your information or want to use it somewhere else down the line in the same JCL?
jayind
 
Posts: 62
Joined: Wed Apr 23, 2008 1:37 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: How to count the number of records

Postby Nisha » Wed Jun 04, 2008 1:38 pm

For information(Just to know the number of records which have been written to the output file). This has to be displayed in the output file to give a summary.
Nisha
 
Posts: 5
Joined: Wed Jun 04, 2008 11:26 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to count the number of records

Postby jayind » Wed Jun 04, 2008 1:57 pm

Check the link...
http://www.mvshelp.net/vbforums/showthread.php?t=22496

Here is the solution provided by Frank Yaeger....

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD ...  input file
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
    TRAILER1=(COUNT=(M11,LENGTH=8))
/*


Hope this helps..
jayind
 
Posts: 62
Joined: Wed Apr 23, 2008 1:37 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: How to count the number of records

Postby Nisha » Wed Jun 04, 2008 2:31 pm

Can the same code be used for counting the records in VSAM as well?
Nisha
 
Posts: 5
Joined: Wed Jun 04, 2008 11:26 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to count the number of records

Postby jayind » Wed Jun 04, 2008 2:33 pm

Yes.
jayind
 
Posts: 62
Joined: Wed Apr 23, 2008 1:37 pm
Location: Chennai, India
Has thanked: 0 time
Been thanked: 0 time

Re: How to count the number of records

Postby Nisha » Wed Jun 04, 2008 2:49 pm

ok :)
Nisha
 
Posts: 5
Joined: Wed Jun 04, 2008 11:26 am
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post