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



>>> If RPG programs call COBOL programs, there can be a performance
penalty. We
saw this in an RPG batch job, which called a COBOL progfram repeatedly.
Performance went from 10+ HOURS to <20 MINUTES, with one simple change. We
added a COBOL program as the first program. All it did was call the
original
first program in the batch job, but it does some smoke & mirrors stuff
.......

No "smoke and mirrors" - it's simply that COBOL programs run within what is
known as the Run Unit.  This is created by the first COBOL program that is
called in the job (if you mix OPM and ILE it's a bit more complicated but
.... ).  According to the ANSII rules for COBOL, if the first program in the
run unit (known as the Main program) returns to it's caller then the run
unit ends - this also has the effect of closing files etc. so it can cause
even bigger performance problems than the one you witnessed.



So, if an RPG program calls a COBOL program which then returns - the run
unit is created on the call, and destroyed on exit - that's a lot of wasted
time.  ILE programs have a mechanism that allows them to avoid this, but
for OPM the only answer is the one you used - put a "stub" program
somewhere in front of the RPG program that calls the "real" COBOL one.
That ensures that the run unit is maintained.



Jon.Paris@halinfo.it


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.