LasseH wrote:Sorry for the miscall, yes, I ment 20k records.
(200.000 records will end up in 10 outputfiles, with 20.000 records each, and 21.000 ends up in 2 files)
It is still not clear as to how you want to split. Do you dynamically allocate the output files each with 20k records?
100,000 records = SPLIT files =5 (5 x 20,000 )
200,000 records = SPLIT files =5 (10 x 20,000 )
250,000 records = SPLIT files =5 (12 x 20,000 + 1 X 10,000)
If that is indeed the case as I mentioned earlier define the max outfil files (100) and then in the next step use IDCAMS to delete all the empty datasets which is the simplest task.
Another solution is to read the file, get the count of records and then dynamically generate the ICETOOL JCL and submit it via INTRDR.