Document revision date: 19 July 1999
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS System Manager's Manual


Previous Contents Index

9.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:

9.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.

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.

9.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.

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:


$ 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.

9.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:

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

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.

9.2 Controlling Access to ODS-5 Volumes

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

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.

9.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) 
    

9.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:

9.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 9-1
Modify disk file characteristics, such as protection or UIC information SET commands listed in Table 9-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

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
6017PRO_039.HTML