I need to skip a column(field) in a delimited file and write the output as is.
For example,
my input file(delimited by pipe)
A1|X1|Y1|Z1
B|X|Y|Z
C3|X2|Y2|Z2
B|X|Y|Z
C3|X2|Y2|Z2
output file should be(without column 3)
A1|X1|Z1
B|X|Z
C3|X2|Z2
B|X|Z
C3|X2|Z2
I am able to get output with below code, but I want my out put should be same as input file but the below code puts each field in a fixed length.
INREC PARSE=(%1=(ENDBEFR=C'|',FIXLEN=2),
%2=(ENDBEFR=C'|',FIXLEN=2),
%=(ENDBEFR=C'|'),
%4=(FIXLEN=2)),
BUILD=(%1,C'|',%2,C'|',%4)
%2=(ENDBEFR=C'|',FIXLEN=2),
%=(ENDBEFR=C'|'),
%4=(FIXLEN=2)),
BUILD=(%1,C'|',%2,C'|',%4)
Without parameter "FIXLEN" I am getting a syntax error.
Is there a way to achieve it?