Author: Arun Raj
Posted: Tue Nov 22, 2016 8:15 pm (GMT 5.5)
I thought about this while posting to OVERLAY the 'key' in the INIT for all the records since we have more detail records and then to check for header and trailer in the subsequent IFTHENs, but was too lazy especially when I cant test anything now (and for the next 2 weeks
).
Or even better as you pointed out, is to make it 3 mutually exclusive IFTHEN conditions in the order of data>>header>>trailer to avoid 'rework' on header and trailer records.
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard
Posted: Tue Nov 22, 2016 8:15 pm (GMT 5.5)
Quote: |
I'd rearrange the order of the IFTHENs, so that the data-one is treated first, it'll avoid a lot of tests for when the header/trailer when most of the records will be data |

Or even better as you pointed out, is to make it 3 mutually exclusive IFTHEN conditions in the order of data>>header>>trailer to avoid 'rework' on header and trailer records.
Code: |
//SYSIN DD * INREC IFTHEN=(WHEN=GROUP....... ...... ...... IFTHEN=(WHEN=(1,2,SS,NE,C'01,99'),OVERLAY=(89:14,5)), IFTHEN=(WHEN=(1,2,CH,EQ,C'01'),OVERLAY=(89:5X'00')), IFTHEN=(WHEN=(1,2,CH,EQ,C'99'),OVERLAY=(89:5X'FF')) ...... ...... |
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard