[mod.computers.vax] Recursive DCL procedures

tjp%Phobos@CIT-HAMLET.ARPA (11/01/85)

Judging by the examples submitted to info-vax, not many people have 
noticed the facility provided in VMS V4 for creating recursive DCL
procedures:  F$ENVIRONMENT("PROCEDURE") returns the file name of the
command procedure being executed.  The following are two lines from
my own recursive procedure for deleting a directory tree (the rest is
left as an exercise for the reader):

$ DELDIR = "@" + F$ENVIRONMENT("PROCEDURE")
...
$ DELDIR [.'F$PARSE(FILESPEC,,,"NAME")']

Tim Pearson, Astronomy Dept, Caltech, Pasadena 91125, USA
ARPAnet:              tjp%phobos@cit-hamlet.arpa
BITNET:               tjp@caltech
NRAO Decnet:          Phobos::TJP
Telephone:            +1 818 356-4980