I have the requirement to catchup the error in the following file. In the below file it has three transaction and each trasaction starts with 'P' record and ends with 'E' Record.
If there is a character '*' in any records then that is the error record and I have to write the
'P' Record and that particular error record to the output file.
In this first transaction the S record (highlighted) has error and I have to write both P and S record in the output
In the second transaction the P record(Highlighte) has error and I have to write only the P record in the output
If you add RECORDS=2 after PUSH then you would create a blank line instead of another P record.
That will be a little better, But I think, you may have to use ICETOOL to get the desired result i.e. to remove blank line and also remove duplicate for a P record having an * .
You would also be able to use RESIZE operator in ICETOOL instead of / in OUTFIL.
I imagine that you have an LRECL of 30 on your output dataset.
No, I don't. And I did check with a LRECL 80 output file and it gave the same result. But, I think, it's the absence of WHEN=NONE that makes us wonder how we are getting the 31=space record. Isn't it ?