×
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'm trying to get my head around this, but failing...
I have a driver program (DRIVERA) that does a bunch of stuff, runs a bunch of private subprocedures, calls some service programs, and calls another program (COMMPGM) that handles some communications with another platform, calls other relevant service programs, runs private subprocedures, etc. Both DRIVERA and COMMPGM are *PGMs (created from SQLRPGLE source), with *INLR and all that. COMMPGM is something of a driver program itself, handling sockets connections, throwing lots of transactions to the other platform, receiving results, writing records to a logfile, etc. Its only caller is DRIVERA.
Now I have a need to return a value from COMMPGM, back to DRIVERA, so DRIVERA can deal appropriately with abnormal situations encountered in COMMPGM. Since I'd set COMMPGM up with a Prototype instead of a *entry PLIST, I figured I'd just adjust that prototype and Procedure Interface to include the return value definition and I'd be well on my way... until the source editor reminded me that extpgm was not compatible with a return value. Apparently I need to use extproc instead? I expect that means other things will need to change, but I don't know exactly what, and that's where I need help.
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, but I don't get to spend a week figuring out how to get a compiled object, and another week finding & fixing the run-time issues brought on by my naiveté. Is there hope? Should be simple, right? We're running v6.1
Thanks.
Michael
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.