"Which" command equivalent for OS390r8 ?



IBM OS/370, MVS, OS/390, Linux, TPF, VM/CMS, VM/ESA, VSE/ESA, z/VM, z/VSE, z/OS, z/OS.e etc...

"Which" command equivalent for OS390r8 ?

Postby mstram » Mon Jun 21, 2010 10:01 pm

*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
mstram
 
Posts: 9
Joined: Tue Jan 26, 2010 9:27 am
Has thanked: 0 time
Been thanked: 0 time

Re: "Which" command equivalent for OS390r8 ?

 

Re: "Which" command equivalent for OS390r8 ?

Postby Robert Sample » Mon Jun 21, 2010 10:44 pm

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.
Robert Sample
Global moderator
 
Posts: 3569
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 256 times

Re: "Which" command equivalent for OS390r8 ?

Postby mstram » Mon Jun 21, 2010 11:14 pm

"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 ?
mstram
 
Posts: 9
Joined: Tue Jan 26, 2010 9:27 am
Has thanked: 0 time
Been thanked: 0 time

Re: "Which" command equivalent for OS390r8 ?

Postby dick scherrer » Mon Jun 21, 2010 11:35 pm

Hello,

From within your tso session, try tso isrddn.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: "Which" command equivalent for OS390r8 ?

Postby Robert Sample » Tue Jun 22, 2010 12:29 am

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.
Robert Sample
Global moderator
 
Posts: 3569
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 256 times


Return to Operating Systems

 


  • Related topics
    Replies
    Views
    Last post