Document revision date: 30 March 2001

## OpenVMS System Manager's Manual

Previous | Contents | Index

### 10.1.2 Setting Users' Expectations of Extended File Specifications

A system manager can help users become accustomed to Extended File Specifications by explaining the differences between ODS-2 and ODS-5 file names. These differences become most apparent when users change from ODS-2 to ODS-5 styles.

If you pass the following usage notes along, users might find them helpful. These notes are divided into the following categories:

- New Extended File Specifications characteristics
- ODS-2 and ODS-5 used together
- Architecture-related notes

#### 10.1.2.1 New Extended File Specifications Characteristics

The following notes discuss issues related to new Extended File Specifications characteristics that are unfamiliar to users.

Be Aware of Volume Structure

Make sure you know whether a disk is an ODS-2 or ODS-5 volume so that you can place ODS-5 files on ODS-5 volumes.

You can display the type of volume by entering commands similar to the following:

    $ SHOW DEVICE DKA500:/FULL

      Disk AABOUT$DKA500:, device type DZ25 Disk, is online, allocated, deallocate
      on dismount, mounted, file-oriented device, shareable.

        Error count                    0    Operations completed 155
        .
        .
        .
      Volume Status:  ODS-5, subject to mount verification, file high-water
      marking, write-back caching enabled.

    $ SHOW DEVICE DKA200:/FULL

      Disk AABOUT$DSA200:, device type RZ25 Disk, is online, allocated, deallocate
      on dismount, mounted, file-oriented device, shareable.

        Error count                    0    Operations completed 232
        .
        .
        .

      Volume Status:  ODS-2, subject to mount verification, file high-water
      marking, write-back caching enabled.

After each command, the Volume Status: that is displayed indicates whether the volume is ODS-5 or ODS-2.

Do Not Use Extended File Names on ODS-2 Volumes

You cannot create a file with an ODS-5 extended file name on an ODS-2 volume.

In the following example, DKA200: is an ODS-2 volume, and the parse style is EXTENDED, which causes RMS to return an error message.

    $ SET DEFAULT DKA200:[TEST]
    $ CREATE x.x.x.x
    %CREATE-E-OPENOUT, error opening DKA200:[TEST]X^.X^.X.X; as output
    -RMS-E-CRE, ACP file create failed
    -SYSTEM-W-BADFILEVER, bad file version number

Case Is Determined by the First Instance of an Extended File Name

On an ODS-5 volume, the case for all versions of a file name is identical; the case is preserved as the file name was first created.

In the following example, the disk is ODS-5.

    $ SET DEFAULT DKA500:[TEST]
    $ SET PROCESS /PARSE_STYLE=EXTENDED
    $ CREATE myfile.txt
    [Ctrl/Z]
    $ CREATE MYFILE.TXT
    [Ctrl/Z]
    $ DIRECTORY

    Directory DKA500:[TEST]
    myfile.txt;2        myfile.txt;1

Be Aware of Case Preservation but Case Blindness of Extended File Specifications

Keep in mind that although an ODS-5 disk preserves the case of a file as it is first entered, it searches for files in a case-blind manner. Similarly, users must also be careful when they do comparisons, such as when they use DCL string functions like `.EQS.` and `F$LOCATE` in a DCL command procedure.

The following example demonstrates the importance of case-blind matching of file names in DCL. In the program, notice that you specify no argument to do a case-sensitive match but that you specify an argument to do a case-blind match.

This program uses `F$SEARCH` to find all the files that have a file type of `.TXT.` Because RMS (and therefore `F$SEARCH` as well does case-blind matching, `F$SEARCH` also finds files with the file type `.txt.` `F$SEARCH` then uses `F$LOCATE` to search the file name for `TEST.` Because `F$LOCATE` does case-sensitive comparisons, it fails to match unless you first change the string to uppercase.

    $ case_blind = 0
    $ if p1 .nes. "" then case_blind = 1 (1)
    $loop:
    $  file = f$search("*.TXT;") (2)
    $  if file .eqs. "" then goto not_found
    $  write sys$output "Search returns " + file
    $  if case_blind .eq. 1 then file = f$edit(file,"UPCASE") (3)
    $  if (f$locate("TEST",file) .ne. f$length(file)) then goto found (4)
    $  goto loop
    $found:
    $   write sys$output "Found a file matching TEST"
    $   exit
    $not_found:
    $   write sys$output "Did not find file matching TEST"
    $   exit

1. Set `case_blind` to 1 if there is an argument (and a case-blind comparison can be made).
2. Get a file ending in `.TXT` or `.txt` (because `F$SEARCH` is case-blind).
3. If a case-blind comparison was selected in Step 1, change the file name to uppercase to make a case-blind comparison.
4. If `F$LOCATE` finds a file, it will go to `found:.`

The following example shows the output when you run the program:

    $ @test
    Search returns DKA300:[FISHER]test.txt;1
    Did not find file matching TEST
    $ @test case-blind
    Search returns DKA300:[FISHER]test.txt;1

    Found a file matching TEST

Abbreviated and Full Directory Names Listed Separately with CONDENSED File Names

Some system utilities and DCL commands, such as DIRECTORY, have a style switch to control how they display file names.

- If the style is CONDENSED, file names up to 255 bytes in length are displayed. When a file specification reaches the 255-byte limit, the directory name is abbreviated to a directory ID (DID).
- If the style is EXPANDED, file names up to 4095 bytes in length are displayed.

The following example shows a CONDENSED directory name. The DIRECTORY command considers a DID abbreviated directory name as different from the unabbreviated directory name and therefore generates a separate header when the abbreviation occurs.

    $ DIR/STYLE=CONDENSED

    Directory DKA300:[DEEPER.aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii._ten.aaaa.
    bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii._ten.aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.
    hhhh.iiii._ten.aaaa.bbbb.cccc.dddd.eeee.ffff.gggg.hhhh.iiii._ten](1)

    aaaa.txt;1

    Total of 1 file.

    Directory DKA300:[528,7036,0](2)

    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.txt;1

    Total of 1 file.

    Grand total of 2 directories, 2 files.(3)

1. With the CONDENSED style, if the combination of the directory name and file name does not exceed 255 bytes, the directory name is not shortened to a DID.
2. With the CONDENSED style, if the combination of the directory name and file name exceeds 255 bytes, the directory name is shortened to a DID.
3. When you issue a DIRECTORY command that displays both a full and an abbreviated directory format for the same directory name, DIRECTORY counts these as two different directories.

For more information about DIRECTORY commands, refer to the OpenVMS DCL Dictionary.

#### 10.1.2.2 ODS-2 and ODS-5 Used Together

The following notes discuss issues related to using ODS-2 and ODS-5 together in a cluster.

Use Traditional File Names in a Mixed-Volume Environment

To avoid ODS-2 and ODS-5 file name incompatibility when working with both ODS-2 and ODS-5 volumes, and to assure backward compatibility with prior versions of OpenVMS, use only ODS-2 traditional file names.

Error Messages Can Vary Depending on Parse Style

Error messages displayed to users might vary depending on the parse style. Syntax errors that were formerly detected at the DCL level are now passed on to the file system level, RMS and XQP, for example, if the parse style is EXTENDED. As a result, the messages users receive for file syntax errors might be slightly different depending on the parse style and volume structure.

The following examples show varying error messages.

- Examples of TRADITIONAL and EXTENDED styles on an ODS-5 volume:

      $ SHOW DEVICE DKA500:/FULL

        Disk AABOUT$DKA500:, device type RZ25 Disk, is online, allocated, deallocate
        on dismount, mounted, file-oriented device, shareable.

          Error count                    0    Operations completed 155
          .
          .
          .
        Volume Status:  ODS-5, (1) subject to mount verification, file high-water
        marking, write-back caching enabled.

      $ SET PROCESS /PARSE_STYLE=TRADITIONAL (2)
      $ OPEN /WRITE FILE z.z.z.z
      %DCL-W-PARMDEL, invalid parameter delimiter - check use of special
      characters \.Z\ (3)
      $ SET PROCESS /PARSE_STYLE=EXTENDED (4)
      $ OPEN /WRITE FILE z.z.z.z
      $ (5)

  1. The volume is ODS-5.
  2. The parse style is set to TRADITIONAL.
  3. DCL returns an error on some ODS-5 file names such as this one.
  4. The parse style is set to EXTENDED.
  5. DCL creates the file.
- Examples of TRADITIONAL and EXTENDED styles on an ODS-2 volume:

        Disk AABOUT$DKA200:, device type RZ25 Disk, is online, allocated, deallocate
        on dismount, mounted, file-oriented device, shareable.

          Error count                    0    Operations completed 232
          .
          .
          .

        Volume Status:  ODS-2, (1) subject to mount verification, file high-water
        marking, write-back caching enabled.

      $ SET PROCESS /PARSE_STYLE=TRADITIONAL (2)
      $ OPEN /WRITE FILE z.z.z.z
      %DCL-W-PARMDEL, invalid parameter delimiter - check use of special
      characters \.Z\ (3)
      $ SET PROCESS /PARSE_STYLE=EXTENDED (4)
      $ OPEN /WRITE FILE z.z.z.z
      %DCL-E-OPENIN, error opening
      -RMS-E-CRE, ACP file create failed (5)
      -SYSTEM-W-BADFILEVER, bad file version number

  1. The volume is ODS-2.
  2. The parse style is set to TRADITIONAL.
  3. DCL returns an error message.
  4. The parse style is set to EXTENDED.
  5. DCL allows the file name, but XQP returns an error.
- Examples of different error messages for the same syntax error:

      $ SHOW DEVICE DKA500:/FULL

        Disk AABOUT$DKA500:, device type RZ25 Disk, is online, allocated, deallocate
        on dismount, mounted, file-oriented device, shareable.

          Error count                    0    Operations completed 155
          .
          .
          .
        Volume Status:  ODS-5, (1) subject to mount verification, file high-water
        marking, write-back caching enabled.

      $ SET PROCESS /PARSE_STYLE=TRADITIONAL (2)
      $ CREATE a^<b.c

      %DCL-W-PARMDEL, invalid parameter delimiter - check use of special
      characters
       \^\ (3)

      $ SET PROCESS /PARSE_STYLE=EXTENDED (4)
      $ CREATE a^<b.c

      %CREATE-E-OPENOUT, error opening a^<b.c as output
      -RMS-F-SYN, file specification syntax error (5)

  1. The volume is ODS-5.
  2. The parse style is set to TRADITIONAL.
  3. DCL returns an error message for a syntax error.
  4. The parse style is set to EXTENDED.
  5. RMS returns a different error message for the same syntax error.

Be Aware of Implicit File Name Output

Be wary of defaults when you allow utilities to create output files based on the file name being processed. Be sure you know where a file is being placed so you will not inadvertently try to place a file with an extended name on an ODS-2 volume.

The following examples show files being placed somewhere you might not expect:

- An error results if an application or a utility attempts to write an ODS-5 extended file name to an ODS-2 (DKA200:) volume; for example:

    $ SHOW DEFAULT
      DKA200:[DOREO]
    $ DUMP /OUTPUT DKA500:[DOREO]This^_is^_a^_file.Dat
    %DUMP-E-OPENOUT, error opening DKA200:[DOREO]THIS^_IS^_A^_FILE.DMP;as output
    -RMS-E-CRE, ACP file create failed
    -SYSTEM-W-BADFILENAME, bad file name syntax

The output file specified with the /OUTPUT qualifier defaults to the same name as the input file, with .DMP as the file type, in the default directory. When the input file specification is an extended name on an ODS-5 volume, the .DMP file must have a traditional name, because it will be written to an ODS-2 volume. As a result, an error occurs.

- A batch command file fails to execute if all of the following conditions are true:
  - A log file is requested implicitly or explicitly.
  - The implicit or explicit log file specification has an extended name (that is, the name is non-ODS-2-compliant).
  - The log file is to be created on an ODS-2 volume.
  The batch command file does not execute because a log file cannot be created. Most frequently, this situation occurs when the logical name SYS$LOGIN refers to an ODS-2 volume; this is because log files are implicitly created on the SYS$LOGIN device. In addition, if notification is disabled, you are not notified that your batch job did not execute.
  To avoid the problem, use the /LOG= qualifier and an ODS-2-compliant log file specification when you submit command files with ODS-5 extended names.

#### 10.1.2.3 Architecture-Related Notes

The following notes discuss Extended File Specifications issues related to system architecture.

Extended File Names Are Not Visible from a VAX System

Although you can mount ODS-5 volumes on a VAX, if you log in to a VAX system, ODS-5 extended file names are not visible. In their place, you see a pseudoname:

- On VAX, if you attempt to display a file name that contains 2-byte Unicode characters, the pseudoname displayed is the following:
  \PUNICODE\.???
- Any other name that is not a legal ODS-2 name is displayed as
  \PISO_LATIN\.???

For example, the same directory listings as they appear on Alpha and VAX systems are:

- On an Alpha system:

      $ DIRECTORY DPA100:[TEST]

      Directory DPA100:[TEST]

      Accounting^_data.lis;1                  atest.txt;1

- On a VAX system:

      $ DIRECTORY DPA200:[TEST]

      Directory DPA200:[TEST]

      \PISO_LATIN\.???                       ATEST.TXT

In addition, the directory depth on a VAX is limited to 8 (or 16, using rooted logicals).

Physical Backups of ODS-5 Volumes on VAX Systems

On OpenVMS VAX systems, BACKUP supports ODS-5 volumes only when you specify the /PHYSICAL qualifier to back up a volume. The BACKUP /PHYSICAL command causes BACKUP to make a block-by-block physical backup of the disk, ignoring the structured contents of the disk.

On Alpha systems, you can use either the BACKUP /IMAGE or BACKUP /PHYSICAL command.

## 10.2 Controlling Access to ODS-5 Volumes

System managers might choose to enforce one or both of the following restrictions:

- Prevent users on a VAX from accessing files on an ODS-5 volume.
- Prevent untested applications from accessing files on an ODS-5 disk. (You can allow certain users to override this access control on an ODS-5 volume.)

The system manager can impose either of these restrictions by using normal OpenVMS discretionary controls. Refer to the OpenVMS Guide to System Security for more information.

The following sections contain examples of restrictions you can impose.

### 10.2.1 Preventing VAX Users from Accessing an ODS-5 Volume

Follow these steps to prevent a user from accessing an ODS-5 volume from a VAX node:

1. Define an identifier (for example, VAX_NODE) to identify users running on an OpenVMS VAX nod, for example:

       $ RUN SYS$SYSTEM:AUTHORIZE

       UAF> ADD /IDENTIFIER VAX_NODE

       %UAF-I-RDBADDMSG, identifier VAX_NODE value %X80010037 added to rights database

2. On each VAX node, add VAX_NODE to the system rights list; for example:

       $ SET RIGHTS_LIST /ENABLE /SYSTEM VAX_NODE

   The /ENABLE qualifier in the command adds VAX_NODE to the system rights list.
   Also add this command to the SYSTARTUP_VMS.COM command procedure.
3. To prevent anyone on a VAX node from gaining access to an ODS-5 volume, place an Access Control Entry (ACE) on the volume that denies access to holders of the VAX_NODE identifier, for example:

       $ SET SECURITY /CLASS=VOLUME ODS5_DISK /ACL=(ID=VAX_NODE,ACCESS=NONE)

### 10.2.2 Preventing an Untested Application from Accessing an ODS-5 Volume

Follow these steps to prevent an untested application from accessing an ODS-5 volume:

1. Define an identifier (for example, ODS5_UNSAFE) to identify applications that you do not want to access an ODS-5 volume, for example:

       UAF> ADD /IDENTIFIER ODS5_UNSAFE /ATTR=SUBSYSTEM

       %UAF-I-RDBADDMSG, identifier ODS5_UNSAFE value %X80010039 added to rights database

2. Attach a protected subsystem ACE to the application with the ODS5_UNSAFE identifier, for example:

       $ SET SECURITY /CLASS=FILE SYS$SYSTEM:APPLICATION.EXE -
       _$ /ACL=(SUBSYSTEM,ID=ODS5_UNSAFE)

3. To each ODS-5 volume, attach an ACE denying access to the ODS-5 volume to holders of the ODS5_UNSAFE identifier, for example:

       $ SET SECURITY /CLASS=VOLUME ODS5_DISK/ ACL=(ID=ODS5_UNSAFE,ACCESS=NONE)

Optionally, you can override the restriction in the last step to allow trained users to access untested applications by following the remaining lettered steps:

1. Create another identifier (for example, ODS5_UNTRAINED):

       UAF> ADD /IDENTIFIER ODS5_UNTRAINED

       %UAF-I-RDBADDMSG, identifier ODS5_UNTRAINED value %X80010038 added to rights database

2. Assign this identifier to all users, for example:

       UAF> GRANT/IDENTIFIER ODS5_UNTRAINED *

       %UAF-I-GRANTMSG, identifier ODS5_UNTRAINED granted to *

3. Instead of Step 3, place an Access Control Entry (ACE) on the volume that denies access to holders of the ODS5_UNTRAINED identifier; for example:

       $ SET SECURITY /CLASS=VOLUME ODS5_DISK/ -
       _$ ACL=(ID=ODS5_UNSAFE+ODS5_UNTRAINED,ACCESS=NONE)

   This command prevents ODS5_UNTRAINED users from accessing the volume with ODS5_UNSAFE applications.
4. Remove the identifier from individual users when you are willing to let them use any application on an ODS-5 volume, for example:

       UAF> REVOKE/IDENTIFIER ODS5_UNTRAINED SHEILA_USER

       %UAF-I-REVOKEMSG, identifier ODS5_UNTRAINED revoked from SHEILA_USER

After you complete these steps:

- An untrained user can use an untested application only to access ODS-2 volumes.
- A trained user can access ODS-5 volumes with any application.

## 10.3 Using DCL Commands with Files

You use the DIGITAL Command Language (DCL) to perform a number of operations on files, as shown in the following table.

Operation | DCL Command
--- | ---
Retrieve disk and magnetic tape file information, such as device and protection characteristics, and display this information on your terminal screen | SHOW commands listed in Table 10-1
Modify disk file characteristics, such as protection or UIC information | SET commands listed in Table 10-3
Display the contents of a directory | DIRECTORY
Display the contents of a file | TYPE
Copy files to and from disk and magnetic tape volumes | COPY

Most DCL commands require file-structured devices. (The OpenVMS DCL Dictionary lists commands that do not require file-structured devices.)

In addition to manipulating files through DCL, you can write programs to assist you in routine file-manipulation tasks. You can write these programs in any of the languages supported by the operating system.

To manipulate individual records within files (that is, to access files at the record level), write programs that include OpenVMS Record Management Services (RMS) facilities. Refer to the OpenVMS Record Management Services Reference Manual for examples of RMS facilities used to manipulate files at the record level.

Previous | Next | Contents | Index

| privacy and legal statement |
6017PRO_040.HTML