Lexical - F$PARSE
$ PROC = F$ENVIRONMENT( “PROCEDURE” )
$ DEVC = F$PARSE( PROC,,, “DEVICE” )
$ DRCT = F$PARSE( PROC,,, “DIRECTORY” )
$ DFLT = F$ENVIRONMENT( “DEFAULT” )
Notes:
This example illustrates how F$PARSE can be used to extract portions of a file specification.
In the example, a new default disk and directory specification is derived from the disk and directory where the currently executing DCL procedure is found, the current default disk and directory are saved, then the new default is applied. A (series of) statement(s) is(are) executed, then the original default disk and directory specification is restored.