|
>Jim Welsh wrote: > > I've been asked by my employer to do some research on the effects of > running an RPG III > program on platforms other than the AS400. > >As far as your information on reentrant goes: All programs on the AS/400 are >reentrant by nature. There is no special coding required. The compiler >creates >an object which contains the instruction set and base memory offset to the >data. >Each user upon calling the program will be assigned a base memory address for >their data and control information to track the current instruction being >executed. So A + B = C turns into OffsetForA + OffsetForB = OffsetForC and is >executed as (UserBaseAddress+OffsetForA) + (UserBaseAddress+OffsetForB) = >(UserBaseAddress+OffsetForC). Kind of an interesting way to look at the PAG, but it gets the idea across! >Special coding was required for the S/36 MRT programs which were a crude >attempt >at reentrant concept: one copy of instructions, many copies of data. All too true! But is Jim asking about re-entrancy or recursiveness? Re-entry means that no matter how many people are using a program, only one copy is active in memory at once. Recursiveness means that RPG program A can call RPG program B who can call RPG program A again. That's not allowed in OPM RPG (sadly, I haven't checked for ILE.) Once Program A is in the job's call stack, it can't be CALLed again or you'll get: Message ID . . . . . . : RPG8888 Severity . . . . . . . : 99 Message type . . . . . : Inquiry Date sent . . . . . . : 02/24/98 Time sent . . . . . . : 15:36:19 Message . . . . : CMD called itself recursively (C S). Cause . . . . . : The RPG program CMD called itself or another program which then called program CMD. Recovery . . . : Enter C to cancel, or S to obtain a system dump. Possible choices for replying to message . . . . . . . . . . . . . . . : C -- Cancel S -- Obtain system dump Buck Calabro Commsoft, Albany, NY +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@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 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.