How to split a file containing records with different characters as delimiter in them??
If my input file is of the
REC1+137:20090901+2
would like to output like
REC1+;137;:;20090901;+;2
I tried using the below Control Card
//SYMNAMES DD *
FLD1,1,4
FLD2,%00
FLD3,%01
..........
..........
COL,':'
PLU,'+'
SEMI,';'
//SORTIN DD DSN=
//SORTOUT DD DSN=
FLD1,1,4
FLD2,%00
FLD3,%01
..........
..........
COL,':'
PLU,'+'
SEMI,';'
//SORTIN DD DSN=
//SORTOUT DD DSN=
//SYSIN DD *
OPTION COPY
* EXTRACT SECOND FIELD INTO %00.
INREC PARSE=(FLD2=(ABSPOS=5,ENDBEFR=(COL OR PLU)),
BUILD=(FLD1,SEMI,FLD2,SEMI,FLD3,SEMI,FLD4,SEMI
FLD6,SEMI,FLD7,SEMI,FLD8,SEMI,FLD9,SEMI,FLD10)
OPTION COPY
* EXTRACT SECOND FIELD INTO %00.
INREC PARSE=(FLD2=(ABSPOS=5,ENDBEFR=(COL OR PLU)),
BUILD=(FLD1,SEMI,FLD2,SEMI,FLD3,SEMI,FLD4,SEMI
FLD6,SEMI,FLD7,SEMI,FLD8,SEMI,FLD9,SEMI,FLD10)
I am not sure if using SORT we can split the file containing more than one delimiter. If yes can you help me with it??