|
Yes, there is an easy trick. Send a message to the previous program on the stack, receive this message in your program and the sender information contains the caller. check the command for more info. Here is some CL source to get you going. pgm parm(&CALL &PGM) SNDPGMMSG MSG('knock knock') TOPGMQ(*PRV &CALL) + KEYVAR(&KEYVAR) RCVMSG MSGKEY(&KEYVAR) SENDER(&SENDER) CHGVAR VAR(&PGM) VALUE(%SST(&SENDER 56 10)) Regards, Wim ----- Original Message ----- From: "CZE Midrange" <CZEMidrange@xxxxxxxxxx> To: <midrange-l@xxxxxxxxxxxx> Sent: Thursday, March 04, 2004 12:53 PM Subject: Recursive program calling > > > > > > I know this problem can be avoided with parameter usage but is there any > function available within RPG400 that will enable you, while inside program > B, to extract the name of program A that just called you? Hope so. > > Thanks much. > > Rick > > _______________________________________________ > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list > To post a message email: MIDRANGE-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/midrange-l > or email: MIDRANGE-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l.
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.