File specification

From VSI OpenVMS Wiki
Jump to: navigation, search

A file specification is the path the system uses to locate and identify a file. It consists of a node name, device, directory or directories, file name, file type, and file version. You do not have to include all the elements of a complete file specification. However, you must specify enough of the file specification so that, when combined with default components, the system can locate and identify the correct file.

Parts of a file specification

Name Description Example Default
Node name Name of the node that the file is located on (or through which it should be accessed). Do not specify the node name if you are accessing a file on the same node. DENVER:: Current node
Device Name of the device that the file resides on DKA100: The device where the default directory resides
Directory Directory or set of directories in which the file is located. Nested directories are separated with a period (.). You do not have to include the master file directory [RD.PROJECTS.SAMBA] The default directory
File name Name of the file SETUP None
File extension Extension (type) of the file .COM File extension
File version Version of the file ;15 File version

Network file specifications

There are three formats for network file specifications:

  • Conventional
  • Foreign
  • Task

In each format, the node specification can include an access control string.

Conventional file specification

The conventional format for files is: node::device:[directory]filename.type;version

Foreign file specification

A foreign file specification is a file that does not conform to OpenVMS syntax. The format used to provide a foreign file specification is:


For example:


Task file specification

A task specification string identifies a program to be executed on the remote node. You can use task specification strings within a program to enable the program to communicate with another program on a remote node. The format used to indicate a task specification string is: node::‘‘task-spec-string’’ This specification identifies the program TEST2 on the remote node BOSTON:


Naming styles

On ODS-5 volumes, there are two possible naming styles for file specifications: traditional (ODS-2 compliant) and extended (ODS-5 compliant).

Traditional naming style (ODS-2 compliant)

OpenVMS Versions 7.1 and earlier follow this syntax, which supports the following character set and naming conventions:

  • alphanumeric characters (A-Z,a-z, 0-9), dollar sign ($), underscore (_) and hyphen (-)
  • case preservation is not supported. All input is normalized (converted to uppercase); all characters are stored in uppercase format
  • the file type is preceded by a period (.), the file version is separated by a semicolon (;) or a period (.), directories are enclosed in brackets ([ ]) or angle brackets (< >), directory levels are separated by periods (.)
  • file names and file extensions can consist of up to 39 characters each, separated by a period (.)

Extended naming style (ODS-5 compliant)

Extended file specification available in the ODS-5 volume structure provides support for longer file names (up to 236 8-bit or 118 16-bit characters) and a broader set of legal characters than in ODS-2: 8-bit ISO Latin-1 character and 16-bit Unicode (UCS-2) character sets. In extended file specifications, all characters from the 8-bit ISO Latin-1 Multinational character set are valid in file specifications, except the following:

  • C0 control codes (0x00 to 0x1F inclusive)
  • Double quotation marks (")
  • Asterisk (*)
  • Backslash (\)
  • Colon (:)
  • Left and right angle brackets (< >)
  • Slash (/)
  • Question mark (?)
  • Vertical bar ( | )

To unambiguously enter or display certain special characters in an ODS-5 compliant file specification, such as a space, you must precede the character with a circumflex (^).

When using extended file names on the DCL command line, you need to set the parsing style to EXTENDED to accept and display extended file specifications. The default setting is TRADITIONAL. To set the parsing style, enter the command:


See also