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



I want to terminate an RPG program abnormally.  

Specifically, I'm integrating some RPG back end stuff with Java.  Java will
use the toolbox program call class to call the RPG program.  If anything
untoward happens on the RPG end (stuff like file locked for backup) our Java
person wants her call to fail.  She does not want to have to inspect a
return code, partially because the direct call class only allows 35
parameters, and she doesn't want to use one up for very rare circumstances.

So we have our files set to USROPN and trap the I/O error just fine.  Now we
want to terminate the RPG program so we don't see any white messages, but we
also want to set the 'return code' to abnormal.

The Error handling chapter of the RPG Reference wasn't much help.  The CL
manual has an elliptical reference to reading the return code (RTVJOBA) but
I couldn't find a way to set it except by setting one of the halt
indicators.  I did discover that EXSR *PSSR works when the *PSSR has ENDSR
*CANCL.

Any other ideas?
  --buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.