IF it helps remember this.... There is no "loop" IF and Else each can only cause one statement to execute - that is why there is no ENDIF. When you want to condition multiple lines of code, you use DO and ENDDO to mark the beginning and end of those blocks of code. (Like braces in languages such as java if { } ) Hope this helped! Kevin
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
Refresh my memory, simple question
Collapse
X
-
Refresh my memory, simple question
Correct, the "else do" executes only when &var1 is not equal to 'N'. InfoCenter: http://publib.boulder.ibm.com/infoce...opic/cl/if.htm
Comment
-
Refresh my memory, simple question
If I have a CL (If, Do, Enddo) "loop" that is immediately followed by an (Else Do, End Do) am I correct that the Else Do executes only when the condition for the first do clause was not met. I know that seems right, just can't believe the code I'm looking at is written like this because logically it doesn't make sense.
Comment
Comment