|
Jon, Busted Again. Gosh, usually the Smoke & Mirrors explanation satisfies them. Thanks for the explanation, a lot clearer and quicker than my foggy brain would have come up with. Bob Larkin Jon.Paris@halinfo.it wrote: > >>> 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 > +---
begin: vcard fn: Bob Larkin n: Larkin;Bob org: <A HREF="HTTP://web.wt.net/~blarkin/">Larkin Computer Consulting</A> adr: <A HREF="http://web.wt.net/~blarkin/">Bob and Diana's Page</A>;;;Houston;TX;<A HREF="http://web.wt.net/~blarkin/">;United States email;internet: blarkin@wt.net title: Systems Consultant x-mozilla-cpt: ;4104 x-mozilla-html: FALSE version: 2.1 end: vcard
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.