I have a requirement where I need to split a set of (input) sequential files (which are DD concatenated), thereby writing them to o/p KSDS files.
The problem here is that VSAM files can not be output when OUTFIL is used (ICE224A is the message thrown if attempted); one way of achieving this is by splitting the input files using OUTFIL into 'n' sequential files, and then SORT COPYing/IDCAMS REPROing the split files to KSDS individually. Is there a method using which this can be done in one step only(writing a COBOL program is the last resort).
SORT Card coded (the value of n goes from 00 to 99, all in the same step):
SORT FIELDS=<Condition>
* FILE FOR SEGMENT <n>
OUTFIL FILES=<n>,REMOVECC,
INCLUDE=(18,1,CH,EQ,C'<n>'),BUILD=(1,500),
HEADER1=(1:500C'0'),
TRAILER1=(1:500C'9')
*
* FILE FOR SEGMENT <n>
OUTFIL FILES=<n>,REMOVECC,
INCLUDE=(18,1,CH,EQ,C'<n>'),BUILD=(1,500),
HEADER1=(1:500C'0'),
TRAILER1=(1:500C'9')
*
Thanks.