number of records in input file

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
govardhan
Member
Posts: 6
Joined: Wed Jun 27, 2007 5:02 pm

number of records in input file

Post by govardhan » Wed Jul 04, 2007 7:17 pm

Is there any sort condition, by which we can come to know the number of records in the input file.

Veera
Moderator
Posts: 111
Joined: Wed Feb 22, 2006 2:59 pm

Post by Veera » Sat Jul 14, 2007 12:48 am

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.

nagesh divvela
Member
Posts: 16
Joined: Sun Dec 27, 2009 12:37 pm

Post by nagesh divvela » Wed Apr 28, 2010 11:02 am

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

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Wed Apr 28, 2010 9:35 pm

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
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others