VMS Help  —  CREATE  file
    Creates a sequential disk file or files.

    Format

      CREATE  filespec[,...]

1  –  Parameter

 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.

2  –  Qualifiers

2.1    /LOG

       /LOG
       /NOLOG (default)

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

2.2    /OWNER_UIC

       /OWNER_UIC=uic

    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.

2.3    /PROTECTION

       /PROTECTION=(ownership[:access][,...])

    Specifies protection for the file.

    o  Specify the ownership parameter as system (S),  owner (O),
       group (G),  or world (W).

    o  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

                                   NOTE

       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 VSI
    OpenVMS Guide to System Security.

2.4    /SYMLINK

       /SYMLINK="text"

    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.

2.5    /VOLUME

       /VOLUME=n

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

3  –  Examples

    1.$ CREATE MEET.TXT
      John, Residents in the apartment complex will hold their annual
      meeting this evening.  We hope to see you there, Regards, Elwood
 <Ctrl/Z>

      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.

    2.$ CREATE A.DAT, B.DAT
      Input line one for A.DAT...
      Input line two for A.DAT...
         .
         .
         .

 <Ctrl/Z>

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

 <Ctrl/Z>

      $

      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.

    3.$ FILE = F$SEARCH("MEET.TXT")
      $ IF FILE .EQS. ""
      $ THEN CREATE MEET.TXT
        John, Residents in the apartment complex will hold their annual
        meeting this evening.  We hope to see you there, Regards, Elwood
      $ ELSE TYPE MEET.TXT
      $ ENDIF
      $ EXIT

      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.

    4.$ SET DEFAULT DKA500:[TEST]
      $ SET PROCESS /CASE=CASE_LOOKUP=SENSITIVE /PARSE_STYLE=EXTENDED
      $ CREATE COEfile.txt
 <Ctrl/Z>

      $ CREATE COEFILE.TXT
 <Ctrl/Z>

      $ CREATE CoEfIlE.txt
 <Ctrl/Z>

      $ DIRECTORY

      Directory DKA500:[TEST]

      CoEfIlE.txt;1
      COEFILE.TXT;1
      COEfile.txt;1

      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.
Close Help