Page 1 of 1
How to count the number of records
Posted:
Wed Jun 04, 2008 11:35 am
by Nisha
Hi,
I have to count the number of records in an output file using JCL.
Regards,
Nisha
Re: How to count the number of records
Posted:
Wed Jun 04, 2008 1:23 pm
by jayind
Is this count for your information or want to use it somewhere else down the line in the same JCL?
Re: How to count the number of records
Posted:
Wed Jun 04, 2008 1:38 pm
by Nisha
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.
Re: How to count the number of records
Posted:
Wed Jun 04, 2008 1:57 pm
by jayind
Check the link...
http://www.mvshelp.net/vbforums/showthread.php?t=22496Here 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..
Re: How to count the number of records
Posted:
Wed Jun 04, 2008 2:31 pm
by Nisha
Can the same code be used for counting the records in VSAM as well?
Re: How to count the number of records
Posted:
Wed Jun 04, 2008 2:33 pm
by jayind
Yes.
Re: How to count the number of records
Posted:
Wed Jun 04, 2008 2:49 pm
by Nisha
ok