[an error occurred while processing this directive]
HP OpenVMS Systems Documentation |
OpenVMS User's Manual
4.3.1 Setting Default to Nonexistent Directories
Note that the operating system allows you to set default to a
nonexistent disk or directory. If you have set default to a nonexistent
directory, when you try to manipulate a file, the system displays a
message stating that the directory does not exist. If you find yourself
in a nonexistent disk or directory and cannot carry out a desired
operation, set default to an existing disk or directory.
To display your current default directory, enter the command SHOW DEFAULT, as shown in the following example:
You can use the SET DEFAULT command to change the default device. The default remains in effect until you enter another SET DEFAULT command or log out. You can also specify the device to which you want to set default without including the directory in the command. The following example shows how to change the default device:
In the following example, the directory [JONES] is assumed and exists on DISK1 and DISK2:
4.3.3 Using Temporary DefaultsIf you enter a list of files and do not give a complete file specification for each file in the list, the system applies temporary defaults for node names, device names, and directory names. To substitute your current default directory for a temporary default, use empty square brackets. If you include a node name in a file that appears in a list, you can override the temporary default by using a double colon. In the following example, A.LIS and B.LIS are copied from the [STATS] directory to the [RESULTS] directory:
Note that the system uses the preceding file specification in the list, [STATS]A.LIS, to determine that the temporary default directory for file B.LIS is [STATS] as well. In the following example, a temporary default device and two different directories are used:
All three files (A.LIS, B.LIS, and C.LIS) are copied from the BASE device. The A.LIS file is copied from the [STATS] directory. The other two files are copied from the [TIME] directory. In the following example, the current default directory is [BETA]. This command copies [ALPHA]TEST.DAT and [BETA]FINAL.DAT to the [RESULTS] directory:
4.4 Protecting Directories from Other UsersYou cannot completely protect a file without applying at least the same protection to the directory in which the file resides. For example, if you deny a user all access to a file but allow that user read access to the file's directory, the user cannot access the contents of the file but can see that it exists. Conversely, a user allowed access to a file and denied access to the file's directory (or one of the parent directories) cannot see that the file exists.
By default, top-level directories receive UIC-based protection (S:RWE,O:RWE,G:RE,W:E) and no ACL. Subdirectories receive UIC-based protection from the parent directory. For more information on protection codes, see Section 10.3. To specify UIC-based protection explicitly when creating a directory, use the /PROTECTION qualifier with the CREATE/DIRECTORY command. You cannot specify an ACL for the directory until the directory is created. To change the UIC-based protection of an existing directory, apply the SET SECURITY/PROTECTION command to the directory file.
You can limit but not prohibit directory access by specifying execute
access but not read access. Execute access on a directory permits you
to examine and read files that you know are contained in the directory;
that means you can examine a file if you already know what the file
specification is, but you cannot display a list of the files in the
directory. For additional security information, refer to the
OpenVMS Guide to System Security.
From any point in a directory structure, you can refer to another directory or subdirectory in the structure. Do this by specifically naming the directory or subdirectory you want or by using the ellipsis (...) and hyphen (-) wildcard characters. For additional information about wildcards, see Section 3.2.
If you are working in an environment with extended file specifications,
refer to Chapter 5 for further information about searching
directory structures with wildcards.
Use the ellipsis (...) wildcard character to search down into the directory hierarchy. To search the current directory and all the subdirectories below it, use the ellipsis by itself as shown:
If you begin the directory specification with an ellipsis, the search begins from your current directory. However, if you begin the directory specification with a period, only the subdirectory that is one level lower than the current directory is searched. To search all top-level directories and their subdirectories from wherever you are in the directory structure, use an asterisk (*) followed by an ellipsis (...). In the following example, assuming the current directory is [JONES], the latest versions of all files named FEES.DAT in [JONES] and all subdirectories under [JONES] will be displayed:
In the following example, assuming the current default directory is [JONES], all subdirectories that end in .SALES are searched, and the latest versions of the file FEDERAL.LIS are displayed:
In the following example, the latest versions of all files named DEPT.DAT in [JONES] and all subdirectories under [JONES] are displayed:
In the following example, assuming the current directory is [JONES], the [.LICENSES] subdirectory will be searched for the file MAILING.LIS, but [JONES.LICENSES.MARRIAGE] will not:
In the following example, assuming the current directory is [JONES], the latest versions of all files named DEPT.DAT in the [.LICENSES] subdirectory under [JONES] and all subdirectories under the [.LICENSES] subdirectory are displayed:
In the following example, as many as eight levels of directory names (the top-level directory and seven subdirectories) are searched (if they exist). Note that the command shown requires READALL privilege.
4.5.2 Hyphen (-) Subdirectory CharacterHyphen characters are used as an abbreviated way to specify [sub-]directories above the current process default directory. Each hyphen represents one level. Hyphens can be followed by subdirectory names (with separating periods) to specify other paths down the directory hierarchy. If you enter so many hyphens that the reference points above the top-level directory, the system displays an error message. In the following example, the current process default directory is [JONES.LICENSES]. The following command displays the latest version of STAFF.DIS in [JONES]:
In the following example, the current directory is [JONES.LICENSES]. The command shown displays the latest version of BILLING.DAT in [JONES.TAXES]:
In the following example, the command shown changes the process default directory to one that is two levels above the current level in the directory hierarchy.
On OpenVMS Version 7.2 Alpha or later with ODS-5 disks, file names and subdirectory names can consist solely of hyphens. To distinguish between a (sub-)directory whose name consists of hyphens and a relative specification, the former must be specified with at least one RMS escape character (^). The following specification refers to the directory three levels above the current process default.
The following specification refers to the directory (UFD) "---":
4.6 Working with Directories in UIC FormatAlthough this chapter focuses on how to use named directories, you can also specify directory names in UIC format. In UIC format, a 2-part octal number forms a user identification code (UIC) that refers to a user file directory (UFD). Almost every DCL command that accepts a file specification can recognize directory names in UIC format. In general, you do not need to use this format unless you are working with a real-time Resource Sharing Executive (RSX) operating system. A UIC directory specification has the following format:
For example, [122,1] is a UIC directory specification representing member 1 in group 122. Directory names in UIC format generally, but not necessarily, correspond to the UIC of the owner of the directory. When you refer to a UIC directory, observe the following rules:
4.6.1 Using Wildcards with UIC Directories
It is also possible to use the asterisk (*) wildcard to specify a UIC
directory. For example, [*,6] indicates all directories with any group
number and a member number of 6. The search is limited to directories
in UIC format. The directory specification [*,*] locates all
directories in UIC format. To locate all named directories as well as
all directories in UIC format, use [*].
Note that you can translate a directory name in UIC format to named format. If necessary, add zeros to the left of the group and member numbers to create a 6-character name. You cannot combine UIC format and named format. If you have a directory with a name in UIC format and you want to specify one of its subdirectories, translate the UIC format to named format. The named equivalent of the UIC directory specification [122,1] is as follows:
To refer to the subdirectory [122,1]SUB.DIR, use the named directory [122001.SUB].
Chapter 5
|
$ CREATE This.File.Name.Has.A.Lot.Of.Periods.DAT $ CREATE - _$ ThisIsAVeryLongFileName^&ItWillKeepGoingForLotsAndLotsOfCharacters.Exceed - _$ ingThe39^,39presentInPreviousVersionsOfOpenVMS $ DIRECTORY Directory TEST$ODS5:[TESTING] ThisIsAVeryLongFileName^&ItWillKeepGoingForLotsAndLotsOfCharacters.Exceeding The39^,39presentInPreviousVersionsOfOpenVMS;1 This^.File^.Name^.Has^.A^.Lot^.Of^.Periods.DAT;1 Total of 2 files. |
Traditional (ODS-2-compliant) file names can use alphanumeric characters (A-Z, a-z, 0-9), the dollar sign ($), underscore (_) and hyphen (-). ODS-5 offers a broader set of characters for naming files.
ISO LATIN-1 and Unicode (UCS-2) Character Sets
ODS-5 supports file names that use the 8-bit ISO Latin-1 character and 16-bit Unicode (UCS-2) character sets. The ISO Latin-1 Multinational character set is a superset of the traditional ASCII character set. In extended file specifications, you can use all characters from the 8-bit ISO Latin-1 Multinational character set except the asterisk (*) and the question mark (?).
Some ISO Latin-1 characters require an escape character to precede them in a file specification in order to be interpreted correctly. In extended file names, RMS and DCL interpret the circumflex (^) as an escape character. The following list contains rules for using the escape character:
. , ; [ ] % ^ & |
File names containing special characters cannot be accessed from a VAX system. See Section 5.7 for more information about mixed-architecture environments. |
The use of the period (.) as a literal character in extended file names requires RMS to determine which periods are file name characters and which are delimiters.
When only one period (.) is used in an extended file name, that period is interpreted as the delimiter. As in previous versions of OpenVMS, this behavior also occurs if the single period is followed by a number:
$ CREATE Test.1 |
creates the file:
Test.1;1 |
Determination of Version Numbers
When there are multiple periods (.) in a file name, RMS looks at all the characters after the last period.
If | Then |
---|---|
The characters after the last period are all numeric | The numeric string is determined to be a version number |
The characters after the last period are all numeric and preceded by a minus sign (-) | The numeric string is determined to be a version number |
There are more than 5 numeric characters after the last period | RMS rejects the file name as illegal |
There is a nonnumeric character following the last period | It is interpreted as a file type delimiter |
For example, the following command:
$ CREATE Test4.3.2.1 |
creates the file:
Test4^.3.2;1 |
where 2 is the file type and 1 is the file version.
A version number explicitly delimited by a semicolon (;) must also be 5
or fewer numeric characters, and can be preceded by a minus sign (-).
5.1.3 Preservation of Case
In prior versions of OpenVMS, DCL, and RMS converted all file specifications to uppercase.
On ODS-5 volumes, you can enter file names in uppercase, lowercase, or mixed case. The case of all files names is preserved as created. For example:
$ CREATE KitContents.Txt $ DIRECTORY Directory DISK1:[USER1] KitContents.Txt;1 |
When you create multiple files with the same name differing only in case, DCL treats the subsequent files as new versions of the original file, and converts them to the same case as the original file. For example:
$ CREATE CaPri $ CREATE CAPRI $ CREATE capri $ DIRECTORY Directory DISK1:[USER1] CaPri.;1 CaPri.;2 CaPri.;3 |
Single- and multiple-character wildcards function as expected with
ODS-5 files. A single-character wildcard represents exactly one
character in either the file name or file type, but may not be used in
the file version string. A multiple-character wildcard can represent
any number of characters (including zero characters) in the file name
or file type. A multiple-character wildcard can be used in place of a
version string.
5.1.4.1 Wildcard Characters
The following characters are always valid wildcard characters:
The percent sign (%) continues to be a single-character wildcard to maintain compatibility with existing applications. The percent sign (%) may be used as a literal character when preceded by the circumflex (^) and is also a literal character in Windows file names. In addition to the percent sign, RMS also recognizes the question mark (?) as a single character wildcard. The question mark functions identically to the percent sign as a wildcard character on OpenVMS 7.2 and later. The percent sign and the question mark each matches exactly one character in a search pattern.
An escaped character (such as ^.) or an escape sequence (such as ^EF or ^U0101) is considered a single character for purposes of wildcard matching. |
1 Unmodified programs and utilities may limit or abbreviate complete file specifications to 255 bytes. |
Previous | Next | Contents | Index |