|
Matthias, If the Program b is RPG, code error handling in program B (i.e. *PSSR), monitor for abnormal end of Program B in you setup CL and restore you environment settings. I do this in my nighttime processes. If a program fails for some reason, the driving CL sends a message to the QSYSOPR message queue and continues on its merry way. Good Luck Mark Mark Walter Sr. Programmer/Analyst Hanover Wire Cloth a div of CCX, Inc. mwalter@hanoverwire.com http://www.hanoverwire.com 717.637.3795 Ext.3040 Matthias Oertli <oertlim@s054.aone. To: midrange-l@midrange.com net.au> cc: Sent by: Subject: Cleanup after program failure owner-midrange-l@mi drange.com 05/02/01 08:51 AM Please respond to MIDRANGE-L Hi guys, I've been asked to code a call to program B from within program A. The difficulty is that program B needs a different environment to program A: A slight change in the library list and a modified data area. This is easily doable, make program A call a small CL which sets up everything, then calls program B and when it returns undoes the changes and finally returns to program A. My problem is this: If program B (or the CL) fails for whatever reason, program A regains control without the environment having been restored to what it should be which could mean disaster. How can I guard against this situation? Thanks for your help. Best regards, Matthias -- --------------------------------------------------------------------- Matthias Oertli <oertlim@s054.aone.net.au> +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.