HP OpenVMS Systems Documentation

Content starts here

HP OpenVMS DCL Dictionary

Previous Contents Index


Creates a sequential disk file or files.


CREATE filespec[,...]



Specifies the name of one or more input files to be created. Wildcard characters are not allowed. If you omit either the file name or the file type, the CREATE command does not supply any defaults. The file name or file type is null. If the specified file already exists, a new version is created.


The CREATE command creates a new sequential disk file. In interactive mode, each separate line that you enter after you enter the command line becomes a record in the newly created file. To terminate the file input, press Ctrl/Z.

When you enter the CREATE command from a command procedure file, the system reads all subsequent records in the command procedure file into the new file until it encounters a dollar sign ($) in the first position in a record. Terminate the file input with a line with a dollar sign in column 1 (or with the end of the command procedure).

If you use an existing file specification with the CREATE command, the newly created file has a higher version number than any existing files with the same specification.

If you use the CREATE command to create a file in a logical name search list, the file will only be created in the first directory produced by the logical name translation.

Normally, the owner of the output file will be the same as the creator of the output file. However, if a user with extended privileges creates the output file, the owner will be the owner of the parent directory or any previous versions of the output file.

Extended privileges include any of the following:

  • SYSPRV (system privilege) or BYPASS
  • System user identification codes (UICs)
  • GRPPRV (group privilege) if the owner of the parent directory (or previous version of the output file) is in the same group as the creator of the new output file
  • An identifier (with the resource attribute) representing the owner of the parent directory (or previous version of the output file)



/NOLOG (default)

Displays the file specification of each new file created as the command executes.


Requires SYSPRV (system privilege) privilege to specify a user identification code (UIC) other than your own.

Specifies the UIC to be associated with the file being created. Specify the UIC by using standard UIC format as described in the OpenVMS User's Manual.


Specifies protection for the file.
  • Specify the ownership parameter as system (S), owner (O), group (G), or world (W).
  • Specify the access parameter as read (R), write (W), execute (E), or delete (D).

If you do not specify a value for each access category, or if you omit the /PROTECTION qualifier, the CREATE command applies the following protection for each unspecified category:

File Already Exists? Protection Applied
Yes Protection of the existing file
No Current default protection


If you attempt to create a file with no access, the file is created with the system default RMS protection values. To create a file with no access, use the SET SECURITY/PROTECTION command.

For more information on specifying protection codes, see the HP OpenVMS Guide to System Security.


Creates a symbolic link containing the specified text without the enclosing quotation marks. If the created symbolic link is subsequently encountered during any file-name processing, the contents of the symbolic link are read and treated as a POSIX pathname specification. No previous version of the symbolic link can exist.

If the path is absolute (that is, it starts with a slash character), RMS attempts to translate its first field as a logical name.


Places the file on the specified relative volume of a multivolume set. By default, the file is placed arbitrarily in a multivolume set.



John, Residents in the apartment complex will hold their annual 
meeting this evening.  We hope to see you there, Regards, Elwood 

The CREATE command in this example creates a text file named MEET.TXT in your default directory. The text file MEET.TXT contains the lines that follow until the Ctrl/Z.


Input line one for A.DAT...
Input line two for A.DAT...
Input line one for B.DAT...
Input line two for B.DAT...

After you enter the CREATE command from the terminal, the system reads input lines into the sequential file A.DAT until Ctrl/Z terminates the first input. The next set of input data is placed in the second file, B.DAT. Again, Ctrl/Z terminates the input.


$ IF FILE .EQS. "" 
  John, Residents in the apartment complex will hold their annual 
  meeting this evening.  We hope to see you there, Regards, Elwood 

In this example, the command procedure searches the default disk and directory for the file MEET.TXT. If the command procedure determines that the file does not exist, it creates a file named MEET.TXT using the CREATE command.


$ CREATE COEfile.txt 
$ CREATE CoEfIlE.txt 
Directory DKA500:[TEST] 

In this example, DKA500 is an ODS-5 disk. If your process is set to CASE_LOOKUP=SENSITIVE and you create more than one file with the same name differing only in case, DCL treats subsequent files as new files and lists them as such.

Previous Next Contents Index