Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Calling program name

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calling program name

    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.

  • #2
    Calling program name

    In a called CL how can I get the name of the calling CL?

    Comment


    • #3
      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

      Working...
      X