Author: Bill Woodger
Subject: Reply to: Join key - Populate Zeros when Unpaired from File 1
Posted: Thu May 12, 2016 2:18 am (GMT 5.5)
RahulG31,
I should have coded before fixing the typos on your post :-)
rexx77,
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.
Subject: Reply to: Join key - Populate Zeros when Unpaired from File 1
Posted: Thu May 12, 2016 2:18 am (GMT 5.5)
RahulG31,
I should have coded before fixing the typos on your post :-)
rexx77,
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.