Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

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

 

Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.