Page 1 of 1

number of records in input file

Posted: Wed Jul 04, 2007 7:17 pm
by govardhan
Is there any sort condition, by which we can come to know the number of records in the input file.

Posted: Sat Jul 14, 2007 12:48 am
by Veera
This should work ...it will write the no of records to SORTOUT FILE ,

COUNT -> Is the keyword

Code: Select all


//SYSIN DD  *                               
        SORT FIELDS=COPY                    
        OUTFIL REMOVECC,NODETAIL,           
        TRAILER1=(10:'NO OF RECORDS:',COUNT)
/*                                          

Thanks,
Veera.

Posted: Wed Apr 28, 2010 11:02 am
by nagesh divvela
Code:


//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(10:'NO OF RECORDS:',COUNT)
/*


Hi...could you please let me know what REMOVECC & NODETAIL strings are for ?

Regards,
Nagesh D

Posted: Wed Apr 28, 2010 9:35 pm
by Frank Yaeger
REMOVECC removes the ANSI carriage control character (e.g. '1' for page eject).

NODETAIL says not to write the data records, so only the report records will be written - in this case, only the TRAILER1 record will be written.

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss? ... g3T7000080

For more information on writing the count to a file, see the "Display the number of input or output records" Smart DFSORT Trick at:

http://www.ibm.com/support/docview.wss? ... g3T7000094