Are you kidding me? In 2011 I can't retrieve the name of the library from which "this" CL program is running? I know we can use the snd/rcv msg CL commands to find out the runtime CL program name, but I assumed the library name was in there too. Especially since they added a *SHORT/*LONG option to the RCVMSG command for the Sender data, but it is not.
What I want to be able to do is to avoid processing the library name of the library that the CL program is running from. Specifically I'm working on a migration routine and when I do a restore on the other system, I don't want to restore the migration tools library, as that would be bad.
What I need to do is retrieve the runtime library from which the CL program is running, and avoid restoring that library. Sure I can restrict the user to running it out of the install library, but hey, why would I do that?