× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 24 Jul 2013 04:24, rob@xxxxxxxxx wrote:
These lines of code:
Do
chkobj ...
monmsg cpf9800 exec(goto err9800)
call ...
...
err9800: /* this label must remain with the EndDo */ +
EndDo

Are nothing near to:
Do
ChkObj QSTRUPEX1 *Pgm /* Check for exit program. */
MonMsg CPF9800 EXEC(Leave) /* Not there or Not Authorized */
Call QSTRUPEX1 /* Run it. */
MonMsg CPF0000
EndDo

The former "is of course effectively the same as the LEAVE" *intends* in the latter. In my message [from which that first code snippet was taken], I was replying to the failed intent, not replying to the potential capability of the LEAVE had the program actually compiled successfully. After posting, I thought to add that word "intends", to clarify that point, but I figured it was obvious enough. Apparently not :-(

The first example never breaks out of the loop. <<SNIP>>

That claim ignores the facts that the original code, the latter of the above compared snippets, is a non-iterative Do-group, and that the code is expressing a desire\intention rather than reality; i.e. the LEAVE is not allowed, as coded, effecting a compile error.

To be clear, there was no *loop* to break out of, in the original code. The Do-group shown was a linear standalone Do-group, not an iterative Do-group, nor was that standalone Do-group located inside an iterative Do-group, else the original code would have compiled without any error. So as I had written, the code snippets are the same, in effect; whereby the former is functional, and the latter was merely expressed as a desired non-functional *intended* effect.

Regards, Chuck

DrFranken on 07/23/2013 04:49 PM wrote:
I wrote this snippet of code:

Do
ChkObj QSTRUPEX1 *Pgm /* Check for exit program. */
MonMsg CPF9800 EXEC(Leave) /* Not there or Not Authorized */
Call QSTRUPEX1 /* Run it. */
MonMsg CPF0000
EndDo


At the LEAVE Statement I get this error:
* CPD0883 30 LEAVE command found outside of DO group. <<SNIP>>

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.