How to split file by multiple dup recs into multiple files.
Posted: Fri Jan 27, 2012 2:33 am
hello,
I have researched the forums and the manuals. i think i am trying to take Sort /SPLIT to far, but wanted to find out if this is possible.
I have a 100,000 rec file (volume always changes) that is sorted in keyed order by first 50 bytes, There is always multiple duplicate key records. I want to SPLIT the file into 4 some what equal output data sets with the duplicate keys on the same output date set, before writing to the next data set. Since the key values always change, i cant code them in sort. The number of duplicate records is variable also.
The idea would be each time key changes write to the next data set revolving thru the 4 files.
The SPLIT functions doesn't seem to be able to do variable splits based on key.
Any suggestions would be very welcomed.
Thank you in advance,
scramblermike
I have researched the forums and the manuals. i think i am trying to take Sort /SPLIT to far, but wanted to find out if this is possible.
I have a 100,000 rec file (volume always changes) that is sorted in keyed order by first 50 bytes, There is always multiple duplicate key records. I want to SPLIT the file into 4 some what equal output data sets with the duplicate keys on the same output date set, before writing to the next data set. Since the key values always change, i cant code them in sort. The number of duplicate records is variable also.
The idea would be each time key changes write to the next data set revolving thru the 4 files.
The SPLIT functions doesn't seem to be able to do variable splits based on key.
Any suggestions would be very welcomed.
Thank you in advance,
scramblermike