Subscribe to keep this site alive! Under new management but as always, still 100% FREE. Anyone with the IBM i is a friend of ours.
The Challenge: How do we differentiate (condition) which occurrence of a segment when there is no element within it that can differentiate one from the other except its relative position?
The Solution:
When you [right click] on the loop starter or a multi-occurring segment, the option 'Define Occurrence Conditions' will setup some kind of checking/conditioning on which occurrence is mapped in so that a mapping instruction can be added when the said condition is met.
For the mapping instruction, the condition drop down will list the newly defined condition. Hence, a condition can be picked or a compound condition can be set.
NOTE: If you are under version 6.4.x, the 'Defined Occurrence Conditions' will be grayed out and not usable. The software company has no plans of fixing this bug as of publishing time (2022.05.12). Upgrade to at least 16.4.x is required or if you are NOT in the position of doing so, here is the work around.
Do you have a new CHALLENGE? Let us know HERE.