Hi,
I have an input file which contains lot of data (80 bytes length) about the return code information of steps of a batch job.
Number of records in input file vary depending on the number of steps in every batch job, a string "BAD RC" is placed in the file in any random position if any of the step in the job has produced an unacceptable return code.
My requirement is to read and copy the content of the input file only if at least one "BAD RC" string is found anywhere in the file ELSE a string "DUMMY" needs to be written to output.
If Input is as below
A
AB
ABC BAD RC
ABCD
ABCDEF
then output should be the same
A
AB
ABC BAD RC
ABCD
ABCDEF
If input is as below
A
AB
ABC
ABCD
ABCDEF
then the output should be
DUMMY
Could anyone please inform me if this can be done using DFSORT and if so then how?