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



Jerry,

Absolutely. In fact, almost all of my *PSSR's have the following format:

/free
...
begsr *pssr;
/copy qrpglesrc,gen_pssr
return;
endsr;
...
P E

where the GEN_PSSR copybook contains generic code to determine the current
procedure name, perform a dump (if necessary), send an error message (if
necessary), set an error code (if necessary) and similar stuff. Because the
RETURN op-code occurs before the ENDSR, the subprocedure doesn't end in
error, so the system error-handling doesn't take effect - it's up to you to
check in the calling procedure/program whether an error occurred. Sometimes
I pass an explicit error value if the procedure has a return value specified
(as in my example in the previous email).

The nice thing is that it's easy to add procedure-specific error handling
between the /COPY line and the RETURN.

Rory


On 10/2/07, Jerry Adams <jerry@xxxxxxxxxxxxxxx> wrote:

So you could have separate *PSSR subroutines with the same names in each
subprocedure. I can definitely see where, in this example, Rory, how
that would be useful.

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.