My favorite solution is to send a scout message to the previous program with SNDPGMMSG. Then use RCVMSG to receive and remove it specifying the SENDER return parameter. If you press F1=Help on the SENDERFMT parameter it will give you the layout of the returned data. The name you want is the "sent-to call stack entry", which is IBM-speak for the calling program. Hope this helps.
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
Calling program name
Collapse
X
-
Calling program name
Hi Robert, You can use API QWVRCSTK to retrieve the names of the programs in the call stack. The entries are loaded into a 1980 byte field called StackEntries. I posted code below. The program code is a called program that determines programs in the call stack. Tom.
Code
Comment
Comment