Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

CL Retrieving program name from a CL program

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

  • CL Retrieving program name from a CL program

    If you have TAATOOLS, you can try Retrieve Program Name - RTVPGMNAM. If that's not what you need, perhaps you could explain a bit more of what you are trying to do?

  • #2
    CL Retrieving program name from a CL program

    Thanks I just tried it and it works great

    Comment


    • #3
      CL Retrieving program name from a CL program

      How can I retrieve a program name from a cl program?

      Comment


      • #4
        CL Retrieving program name from a CL program

        In case you do not have TAATOOLS (or anything similar), you can retrieve the Program Name with the following: &@PGMID is declared as 10 Alpha and &SENDER is declared as 80 Alpha. SndPgmMsg Msg('Retrieve Program Name') ToPgmQ(*Same) RcvMsg Sender(&Sender) Chgvar &@Pgmid Value(%Sst(&Sender 27 10)) The downside to utilizing logic like this is the possibility that IBM change the keywords to the command or the size of any of the fields and make the spacing of the SubString incorrect. I utilize this technique whenever I have to pass the program name or have a CL program working with a Display File and need to Display the program name on the DSPF. This works fine for me and is better than hard-coding the information. Thank you - Lee.

        Comment

        Working...
        X