Page 1 of 1

"Which" command equivalent for OS390r8 ?

PostPosted: Mon Jun 21, 2010 10:01 pm
by mstram
*nix has a handy command "which".

From the man page :

which [options] [--] programname [...]

Which takes one or more arguments. For each of its arguments it prints
to stdout the full path of the executables that would have been exe-
cuted when this argument had been entered at the shell prompt. It does
this by searching for an executable or script in the directories listed
in the environment variable PATH using the same algorithm as bash(1).

Is there an equivalent command for MVS (OS390r8)?

If not how would I write one?

I'm reading through 'ABC's of System Programming for OS390', and VOl #2, Chapter 4 "LPA, LNKLST, authorized libraries", and chapter 1, "IPL" have been helpful, in my attempt to understand how MVS searches for executables.


Mike

Re: "Which" command equivalent for OS390r8 ?

PostPosted: Mon Jun 21, 2010 10:44 pm
by Robert Sample
OS390R8 is quite old at this point -- the current version of the operating system is z/OS 1.11 so you're talking about something that is a dozen or more releases back.

However, z/OS has the whence command which gives the full path name that a given program is located in -- the program could be located in a number of directories; this command only returns the location of the first in the path.

Re: "Which" command equivalent for OS390r8 ?

PostPosted: Mon Jun 21, 2010 11:14 pm
by mstram
"whence" is an OMVS / unix system services command.

I'm interested in a TSO command / Rexx script etc that works on the "native" MVS system so to speak.

e.g. where is the "ISPF" command / module located ?

Re: "Which" command equivalent for OS390r8 ?

PostPosted: Mon Jun 21, 2010 11:35 pm
by dick scherrer
Hello,

From within your tso session, try tso isrddn.

Re: "Which" command equivalent for OS390r8 ?

PostPosted: Tue Jun 22, 2010 12:29 am
by Robert Sample
In general, what you are asking for does not exist. You can use tso isrddn to find the allocations for your TSO session. However, that will not tell you programs being executed from a linklist library. Most sites restrict access to the linklist, so you would need to contact your site support group for assistance. At some sites, merely attempting to list the contents of the linklist is caused for employee action up to and including termination -- so you really don't want to go much further without talking to your site support group. They may have what you want already available.