Z266: Get the name of the executing module

Author(s): F. Carminati, J. Zoll Library: KERNLIB, VAX only
Submitter: Submitted: 01.04.1994
Language: Fortran Revised:

This routine will figure out the path-name of the executing image. On the VAX this is done with a system call, on UNIX by scanning the search path until it finds the module whose name is in argv[0].

Structure:

SUBROUTINE subprograms
User Entry Names: WHOAMI
Common Blocks: COMMON /SLATE/ ND,NE,NF,DUMMY(37)

Usage:

    CALL WHOAMI(NAME)
On exit, NAME contains the full path-name of the module.

Status and various lengths are returned in /SLATE/:

    ND = 0  if the call failed,
       > 0  the number of characters in the path-name
On the VAX:
ND =  number of characters in the path-name with .EXE;n stripped
NE =  number of characters before the semicolon,
NF =  number of characters in the complete name.
For example:
      if NAME is  DISK:[CERN]WYLBUR.EXE;4
                  _:.=+=.: 1_:.=+=.: 2_:.=+=
 
      we will get  ND=17, NE=21, NF=23.
Note: At the moment this is available only on the VAX; the code exists for UNIX but is not yet in the library. tex2html_wrap_inline52

Michel Goossens Wed Jun 5 10:07:35 METDST 1996