Steve, There are many ways to do this with SyncSort. The following is just one of the ways. If you would like to pursue this further feel free to contact me directly.
//STEP1 EXEC PGM=SORT //SORTIN DD DSN=your.dsn.name,DISP=SHR //SORTOUT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSIN DD * INREC FIELDS=(C'TOTAL NUMBER OR RECORDS ',SEQNUM,8,ZD) SORT FIELDS=(25,8,ZD,D) OUTFIL ENDREC=1 /* John Reda Syncsort, Inc. -----Original Message----- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Steve Grimes Sent: Thursday, July 26, 2007 5:30 PM To: IBM-MAIN@BAMA.UA.EDU Subject: Counting Records in Files Hello! z/OS 1.7 here! This is (I hope) a pre-Friday easy opinion question. The only parameters are, that we have no real third party tools to solve this except SyncSort. We need to count the number of records in about 100 flat files. Since we're already running these through SyncSort, I'm thinking of keeping and parsing the output of these with Rexx, but thought I would ask first to see if there are other nifty first. TIA! Stg In order to fulfill auditor requirements, Focus needs to compare the number of records FTP’d to FOCUS with the number of records used in its night production database loads. There are currently ten jobs that FTP over 100 files to the FOCUS server. Most of these jobs are put through an MVS SYNC SORT process to place the data in the correct format, so a total record count for those datasets is available in the SYSOUT. Getting this information manually is very time consuming, so we want to develop an automated method. Since a job that would read these counts from the SYSOUT file would be cumbersome to write, I would like to know if there is a means of directly counting the records in a dataset. One method of counting is provided by SYNC SORT, using the TRAILER parameter. Do you know of any others? ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html