I am a complete nowise and would greatly appreciate help with a script.
I have a file which needs to be split into multiple file based on the error code. Each record begins with
REPORT: RESP FRONT SYSTEM
and end with
END OF REPORT
between these line is some errorcd.
If the program is provided with the following text in the parameter file it should create 2 different files for
every errorcd not creating a file for the once which don't have any error.
REPORT: RESP FRONT SYSTEM
RUN DATE: 20080529 REPORT
RECORD SEQ ERROR
TYPE NO CODE ERROR DESCRIPTION
BHD 0018586 132 NOT AUTHORIZED.
BHD 0019529 132 NOT AUTHORIZED.
BHD 0019529 235 NOT VALID. (This line should not appear on the new file since the seq_no for the previous is same)
END OF REPORT
SUBMITTER ID: DEVON
FILE ID: 407 REJECTED PROD
RECORD SEQ ERROR
TYPE NO CODE ERROR DESCRIPTION
END OF REPORT
Thanks for the help in advance
Start Free Trial