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



The most likely cause of your problem is the fact that COBOL (by definition)
issues a reclaim to destroy the run unit when returning from the root
program.  Since you only have one COBOL program in the stack this is always
going to be the root on every call and will always try to "clean up".

When running in a conventional environment the normal "cure" is to ensure
that a stub COBOL program remains in the run unit i.e. by calling it before
the initial RPG program in your case.  This is not going to help here unless
there is some tool box magic that I am not aware of to make sure you get
back into the same job.

I'm not sure if you can use this solution as you stated it was third party
code but, assuming you have the source, ILE COBOL provides an answer for
this problem - hopefully such a change will not cause you other problems.
You will need to change the COBOL to CBLLE and watch out for any impact with
overrides etc. because it will now be running in a separate AG (unless you
want to risk running it with *CALLER when it will run in the default AG).
You will also need to modify the code to change the current return statement
to EXIT PROGRAM CONTINUE RUN UNIT (or something very close to that syntax -
no COBOL manual to hand!).  That will prevent the COBOL from doing the
reclaim - but you'll have to find some other way to clean it up later.
Since I don't know how you do that with the RPG etc. I can't really offer a
suggestion.

If you don't have the source, best I can suggest is that you run these
programs at the other end of a dataq as a batch process - that will allow
the use of the stub method without which the performance of the COBOL
program will stink.

PS. Are you "safe" with running OPM RPG and CL stuff in a threaded
environment like this?  I know that RPG IV and ILE COBOL were updated to
force single threading in the run time - admittedly there isn't much in the
way of run time for the OPM languages but ......

Jon Paris
Partner400



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.