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



Hi Tim,

Am 21.02.2024 um 23:02 schrieb Tim Adair <tadair@xxxxxxxxxxxxxxxx>:

Given the following scenario:
PROGRAM A calls Program B. Program B calls Program C. Program C gets an error (of any kind).

You write "CALL" - but is it possible that you mean Pgm A "submits" the calls to "B/C" to batch?

I'm writing in RPGLE (interactive) Program A, which reads a file where each record contains the name of a (Program B) program. These B programs are almost all CL programs that call RPGLE programs (which are the C-level programs). If an error occurs in a C-level program, I want this communicated to program A which will notify the user, _BUT_ I don't want to lose (or automatically respond to) the error in program C. I want program A to notify the user, but I still want to be able to manually deal with the original error in program C.

If Pgm A really CALLs the B level programs, this is not possible, because Pgm A is "on-hold" until the call to to B ends.

Now the kicker... This must be done without modifying any of the B or C-level programs. All the hoop-jumping must be done in the new A-level program.

If you use SBMJOB to run B in batch, it sure is possible. Use IBM i services to check the job states for "MSGW" status - and if you have one, read the messages from the job log of that job to find out which error happened (also using IBM i services).

I wrote something similar for an end user background job tool - they should know if any of their job is waiting for an error to respond. Wasn't so hard with the SQL IBM i services - look in the Work Management category.

HTH
Daniel

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.