[an error occurred while processing this directive]
HP OpenVMS Systems Documentation |
HP OpenVMS DCL Dictionary
SET DEFAULT
Sets your default device and directory specifications. The new default is applied to all subsequent file specifications that do not explicitly include a device or directory name. FormatSET DEFAULT [device-name[:]][directory-spec] Parameters
|
#1 |
---|
$ SET DEFAULT [TANNER] |
The SET DEFAULT command in this example changes the default directory to [TANNER]. The default disk device does not change.
#2 |
---|
$ SET DEFAULT $FLOPPY1:[MOREAU.MEMOS] |
The SET DEFAULT command in this example sets your default to the MOREAU.MEMOS subdirectory on $FLOPPY1.
#3 |
---|
$ SET DEFAULT $FLOPPY1: |
The SET DEFAULT command in this example sets the default device to $FLOPPY1. The directory name does not change.
#4 |
---|
$ SET DEFAULT [-] |
The SET DEFAULT command in this example changes the default directory to the parent directory of the one you are currently in. For example, if the current directory is $FLOPPY1:[NIELSEN.MEMOS], this command sets your default to $FLOPPY1:[NIELSEN]. If you are in $FLOPPY1:[NIELSEN], this command sets your default to the master directory on the disk---$FLOPPY1:[000000].
#5 |
---|
$ SAVEDEF = F$ENVIRONMENT("DEFAULT") $ SET DEFAULT [122001.ZAMORA.APP10] . . . $ SET DEFAULT 'SAVEDEF' |
The command procedure in this example uses the F$ENVIRONMENT lexical function to save the current default directory in the symbol named SAVEDEF. The SET DEFAULT command changes the default directory 122001.ZAMORA.APP10. Later, the symbol SAVEDEF is used to restore the original default directory.
#6 |
---|
$ SHOW DEFAULT WORK:[TOP] $ DEFINE X WORK:[TOP.SUB1],WORK:[TOP.SUB2] $ SET DEFAULT X $ SHOW DEFAULT X:[TOP] = WORK:[TOP.SUB1] = WORK:[TOP.SUB2] $ DIRECTORY Directory WORK:[TOP.SUB1] KUDOS.TMP;1 Total of 1 file. Directory WORK:[TOP.SUB2] KUDOS.TMP;1 Total of 1 file. Grand total of 2 directories, 2 files. $ DIRECTORY [] Directory WORK:[TOP] KUDOS.TMP;1 NETSERVER.LOG;2 Total of 2 files. |
In this example, the default directory is WORK:[TOP]. X is then defined to be a search list consisting of two subdirectories. When the SET DEFAULT X command is entered, the search list (X) is equated with the logical name SYS$DISK and is entered into the disk field. The subsequent SHOW DEFAULT command shows both the search list and the current default directory, followed by the expanded search list.
If a DIRECTORY command is entered, the directories searched are those contained in the logical name X; however, if the current default directory specification ([]) is explicitly entered, the current default directory, rather than SYS$DISK, is searched.
#7 |
---|
$SET PROCESS/PARSE_STYLE=EXTENDED $SET DEFAULT WORK:[11,1,0] $SHOW DEFAULT WORK:[11,1,0] $DIRECTORY Directory WORK:[11,1,0] X.X;1 Total of 1 file. |
On Alpha systems, the SET DEFAULT command in this example uses a directory ID (DID) in the directory specification.
#8 |
---|
$SET PROCESS/PARSE_STYLE=EXTENDED $SET DEFAULT - WORK:[.LONG_DIRECTORY_NAME_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA] $SET DEFAULT - WORK:[.LONG_SUBDIRECTORY_NAME_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB] $SET DEFAULT - WORK:[.LONG_SUBDIRECTORY_NAME_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC] $SET DEFAULT - WORK:[.LONG_SUBDIRECTORY_NAME_DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD] $SET DEFAULT - WORK:[.LONG_SUBDIRECTORY_NAME_EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE] $SHOW DEFAULT MDA0:[15,1,0] $SET DEFAULT [-] %RMS-F-DIR, error in directory name $SET DEFAULT [.TEST] $SHOW DEFAULT MDA0:[15,1,0.TEST] |
On Alpha systems, because the total length of the default directory string would exceed 255 characters in this example, a Directory ID is used in the directory specification. When the default directory string is replaced with a Directory ID, it is not possible to use the minus sign to specify the next higher directory.
Previous | Next | Contents | Index |