× 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 Michael,

<snip>
Essentially the process should look like this:
DRIVERA:
...Do some stuff...
DOU done;
If not done;
...Do more stuff...
If COMMPGM(a : b : c) = 'TYPE-A BAD STUFF HAPPENED';
...Do failure stuff...
ITER;
else;
...Do other stuff...
endif;
endif;
enddo;
...Do cleanup stuff...
INLR = *on;

I'd really rather not go back to the PLIST approach...
</snip>

Your issue has absolutely nothing to do with the differences between using a *ENTRY PLIST and using a PI. It is your (incorrect) understanding of the two that is confusing you.

In both cases you can achieve what you want by simply adding an extra parameter to your PR/PI (or you PLIST if you still live in the 90s :-) ), which you pass BY REFERENCE (the default).
This allows COMMPGM to modify the passed parameter and the changes it makes be seen by DRIVERA.
The new parameter doesn't need to be optional as DRIVERA is the ONLY consumer of COMMPGM and it will be modified to pass it.

Your code would then look like this (with variable 'd' passed as the new parameter and checked post-call):
DRIVERA:
...Do some stuff...
DOU done;
If not done;
...Do more stuff...
COMMPGM(a : b : c :d) <=== d is the new parameter you pass and check once the call is complete
If d = 'TYPE-A BAD STUFF HAPPENED';
...Do failure stuff...
ITER;
else;
...Do other stuff...
endif;
endif;
enddo;
...Do cleanup stuff...
INLR = *on;

HTH

Cheers

Larry Ducie




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.