The output file has Zeroes when unpaired F1 exists. But it is being displayed like when I see it with copybook layout. It is missing sign, as module is reading the value into COMP-3 field. How to populate Zeroes for unpaired F1 records.
Joined: 09 Mar 2011 Posts: 7312 Location: Inside the Matrix
I should have coded before fixing the typos on your post :-)
Please use the Code-tags to preserve spacing.
Look at the use of the match-marker (a ? in the REFORMAT, which is replaced with the result of the join, B for both (a match), 1 for a mismatched file1, 2 for a mismatched file 2).
Use INREC, you need a BUILD to turn the REFORMAT record into the expected output, then an OVERLAY (and use IFOUTLEN to cut the record down) or a conditional BUILD with a second BUILD on WHEN=NONE - one BUILD doing a packed-zero, the other doing the actual value from the REFORMAT record.