Updated: 11 December 1998 |
OpenVMS System Manager's Manual
Previous | Contents | Index |
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:
The following notes discuss issues related to new Extended File Specifications characteristics that are unfamiliar to users.
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 |
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) |
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.
$ 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) |
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 |
$ 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) |
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.
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:
$ DIRECTORY DPA100:[TEST] Directory DPA100:[TEST] Accounting^_data.lis;1 atest.txt;1 |
$ 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.
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:
$ RUN SYS$SYSTEM:AUTHORIZE UAF> ADD /IDENTIFIER VAX_NODE %UAF-I-RDBADDMSG, identifier VAX_NODE value %X80010037 added to rights database |
$ SET RIGHTS_LIST /ENABLE /SYSTEM VAX_NODE |
$ SET SECURITY /CLASS=VOLUME ODS5_DISK /ACL=(ID=VAX_NODE,ACCESS=NONE) |
Follow these steps to prevent an untested application from accessing an ODS-5 volume:
UAF> ADD /IDENTIFIER ODS5_UNSAFE /ATTR=SUBSYSTEM %UAF-I-RDBADDMSG, identifier ODS5_UNSAFE value %X80010039 added to rights database |
$ SET SECURITY /CLASS=FILE SYS$SYSTEM:APPLICATION.EXE - _$ /ACL=(SUBSYSTEM,ID=ODS5_UNSAFE) |
$ 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:
UAF> ADD /IDENTIFIER ODS5_UNTRAINED %UAF-I-RDBADDMSG, identifier ODS5_UNTRAINED value %X80010038 added to rights database |
UAF> GRANT/IDENTIFIER ODS5_UNTRAINED * %UAF-I-GRANTMSG, identifier ODS5_UNTRAINED granted to * |
$ SET SECURITY /CLASS=VOLUME ODS5_DISK/ - _$ ACL=(ID=ODS5_UNSAFE+ODS5_UNTRAINED,ACCESS=NONE) |
UAF> REVOKE/IDENTIFIER ODS5_UNTRAINED SHEILA_USER %UAF-I-REVOKEMSG, identifier ODS5_UNTRAINED revoked from SHEILA_USER |
After you complete these steps:
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 |
Copyright © Compaq Computer Corporation 1998. All rights reserved. Legal |
6017PRO_039.HTML
|