I have some garbage in some of the records that I would like to change.
But because it is a very large file, would like to select first the records I want to replace
So, I am assuming I can use only one IFTHEN-WHEN with several FINDREP.
but I am stuck with the IFTHEN. Got an ugly wer268.
here is the code
INREC IFTHEN=(WHEN=(51,8,CH,EQ,C'ACTUALX3',OR,51,6,CH,EQ,C'VXY033'),
*
FINDREP=(ABSPOS=8,INOUT=(X'0T',X'40')),
FINDREP=(ABSPOS=9,INOUT=(X'0T',X'40')),
FINDREP=(ABSPOS=10,INOUT=(X'0T',X'40')),
FINDREP=(ABSPOS=16,INOUT=(X'0T',X'40')))
SORT FIELDS=(51,50,CH,A,1,50,CH,A)
SUM FIELDS=(102,8,ZD)
END
*
FINDREP=(ABSPOS=8,INOUT=(X'0T',X'40')),
FINDREP=(ABSPOS=9,INOUT=(X'0T',X'40')),
FINDREP=(ABSPOS=10,INOUT=(X'0T',X'40')),
FINDREP=(ABSPOS=16,INOUT=(X'0T',X'40')))
SORT FIELDS=(51,50,CH,A,1,50,CH,A)
SUM FIELDS=(102,8,ZD)
END
So, I changed it a bit like this one:
INREC IFTHEN=(WHEN=(51,8,CH,EQ,C'ACTUALX3'),
FINDREP=(IN,X'0D',OUT=X'40') STARTPOS=8,ENDPOS=16,
IFTHEN=(WHEN=(51,6,CH,EQ,C'VXY033'),
FINDREP=(IN,X'0D',OUT=X'40') STARTPOS=8,ENDPOS=16
SORT FIELDS=(51,50,CH,A,1,50,CH,A)
SUM FIELDS=(102,8,ZD)
END
FINDREP=(IN,X'0D',OUT=X'40') STARTPOS=8,ENDPOS=16,
IFTHEN=(WHEN=(51,6,CH,EQ,C'VXY033'),
FINDREP=(IN,X'0D',OUT=X'40') STARTPOS=8,ENDPOS=16
SORT FIELDS=(51,50,CH,A,1,50,CH,A)
SUM FIELDS=(102,8,ZD)
END
...Still the same.
What am I missing ? don't get why it is complaing about the last comma at the end of the INREC line.
Thank
Miguel
I need to change a x'0T' to a space before the sort happens.
Code'd