Warm greeting!!
I am trying to update the 190 column as ' ' (Two blank spaces) by validaing the 1st position of the file using the following sortcard:
Input :
1234567 11 20140101
1234568 12 20140102
1234569 20140103
1234568 12 20140102
1234569 20140103
SYSIN :
OPTION COPY
OUTREC IFTHEN=(WHEN=(1,7,CH,EQ,C'1234567'),OVERLAY=(10:C' ')), -
IFTHEN=(WHEN=NONE,BUILD=(1:1,20))
Expected Output:
1234567 20140101
1234568 12 20140102
1234569 01 20140103 (01 is not present in the input)
1234568 12 20140102
1234569 01 20140103 (01 is not present in the input)
In the above code, i am facing an issue that remaining records (other than "1234567" in position 1) are filled with junk values.
I need to write the unmatched records as it is.
Please suggest me a correct sortcard.
Thanks