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



First of all, I always take the time to do 'Control Groups' in BRMS
instead of SAVLIBBRM. These normally do a wonderful job of error
handling.

Second, I find it hard to believe that the program is really just

SAVLIBBRM...

MONMSG MSGID(CPF0000 BRM0000) EXEC(GOTO +
CMDLBL(ERRSAVLIB1))
ERRSAVLIB1:
CHGVAR VAR(&SAVLIBBRM1) VALUE('99')
CHGVAR VAR(&RC) VALUE('90')

Then:

IF COND(&SAVLIBBRM1 *NE '00') THEN(DO)
SNDPGMMSG MSG(Some error +
in xxxxi') MSGTYPE(*INFO)

Because, if so, then you would always be getting the SNDPGMMSG. What's
the point of going to the next consecutive line?

Now, let's say you do this instead

MONMSG MSGID(CPF0000 BRM0000) EXEC(GOTO +
CMDLBL(ERRSAVLIB1))
/* Above is first executable line as a generic error handler */

/* Rob inserts these three lines */
CHGVAR &SAVLIBBRM1 VALUE('00')
SAVLIBBRM ...
GOTO THEN

ERRSAVLIB1:
CHGVAR VAR(&SAVLIBBRM1) VALUE('99')
CHGVAR VAR(&RC) VALUE('90')

Then:

IF COND(&SAVLIBBRM1 *NE '00') THEN(DO)
SNDPGMMSG MSG(Some error +
in xxxxi') MSGTYPE(*INFO)

Then one would reasonably expect your message to trigger. Not on CPF415A
as that might be only an informational message. CPF3794 should be an
escape message (at least according to the help on STRBKUBRM).

1) Make sure that you did have an "Escape" message and not a Completion,
Diagnostic, Information, etc.
2) Make sure that your generic error handler (monmsg cpf0000...) is the
very first executable line in your program. Otherwise it only monitors
the statement above it.


ps:
Your language is fine, but it's "caught" not "catchted".



Rob Berendt

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.