Oh, good one! Yes, I do the same. Although I still insist on the positive
choice coming first, then the negative, in other words avoiding this
construction:
If Not Exists(Key, Collection, ox) Then
'what to do if not found
Else
'process ox if found
End If
It should be If <true>, then ELSE <false>.
Of course, this might work and then the issue doesn't come up:
If Not Exists(Key, Collection, ox) Then Abend Key & " not found!"
' ox was found; process
---
Bob Bridges, [email protected], cell 336 382-7313
/* Unspecified error; smash forehead on keyboard to continue. */
-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Paul Gilmartin
Sent: Friday, June 18, 2021 12:46
I try to code my IF; THEN; ELSE so the shorter branch (often a termination or
error EXIT or ITERATE) comes first.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN