Another technique can be to select records based on some data; such as the last digit, or next to last digit of an account number or employee ID, and parsing to separate files based on the digit or range of digits in that spot.
This has the advantage of not needing to know any counts of records at all. Darren -----Original Message----- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Rajeev Vasudevan Sent: Monday, May 14, 2007 10:08 AM To: [email protected] Subject: Dynamic spliiting of file Hello, Hi, Please provide me your suggestions/solutions to achieve the following: A production job runs daily and creates a huge file with 'n' number of records. , I want to use a utility (assuming SYNCSORT with COUNT) to know the 'n' number of records from this file and want to split the file into equal output files (each output file should have 1,00,000 records). How to achieve it dynamically if records vary on daily basis? On a given day we may get 5,00,000 and on the other day we may get 8,00,000 records. So, depending on the count I need to split the input file into 5 or 8 pieces for further processing. After this processing (suppose a COBOL program) I may again get 5 or 8 files. Please provide your suggestions/solutions/ideas to this problem. Please let me know if you need more inputs/details Thanks, Raj ---------------------------------------------------------------------- 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

