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?
Unconfigured Ad Widget
Collapse
CL Retrieving program name from a CL program
Collapse
X
-
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
-
Comment