HP OpenVMS Systems

ask the wizard
Content starts here

Self-referential DCL procedure?

» close window

The Question is:

 
How can I know the path of my DCL command procedure from inside of it?
 
 


The Answer is :

  F$ENVIRONMENT("PROCEDURE") will return the filespec of the currently
  executing procedure. This can then be parsed to determine the device
  and directory:
 
$ ThisFile=F$ENVIRONMENT("PROCEDURE")
$ ThisDev=F$PARSE(ThisFile,,,"DEVICE")
$ ThisDir=F$PARSE(ThisFile,,,"DIRECTORY")

answer written or last revised on ( 14-MAY-2001 )

» close window