× 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.



"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> wrote on 12/04/2019
05:08:38 AM:
1) But how would it be identified in the CL via a MONMSG?
It would be nice if some example someone could provide for this case.

The following will only work if PGMA raises an exception when it
fails.

DCL VAR(&GOOD) TYPE(*LGL)

CHGVAR VAR(&GOOD) VALUE('1')
CALL PGM(PGMA)
MONMSG MSGID(RXI0000 CPF0000 CPE0000 CPD0000 +
MCH0000) EXEC(DO)
CHGVAR VAR(&GOOD) VALUE('0')
ENDDO

IF COND(&GOOD) THEN(DO)
CALL PGM(PGMB)
ENDDO


2) How does Program A intentionally set that parameter value which CL
can
use to identify whether it 'OK' to go on and Call Program B or not ?

If PGMA does *NOT* raise an exception when it fails, then PGMA
must be passed a parameter which PGMA can set to indicate success or
failure. For example:

DCL VAR(&GOOD) TYPE(*LGL) VALUE('0')

CALL PGM(PGMA) PARM(&GOOD)

IF COND(&GOOD) THEN(DO)
CALL PGM(PGMB)
ENDDO


If sometimes PGMA raises an exception and sometimes it doesn't,
then you must combine both methods.

Sincerely,

Dave Clark

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.