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 Guide to Extended File Specifications


Previous Contents Index

3.3 Working in Mixed Environments

When working in an environment that contains both OpenVMS Alpha and OpenVMS VAX systems, it is important for a user to know the following:

OpenVMS 7.2 allows VAX systems to mount ODS-5 volumes; however, users on OpenVMS VAX systems can access only files with ODS-2-compliant file names.

When working in a mixed environment of ODS-2 and ODS-5 volumes, keep in mind the restrictions of ODS-2 file names when creating files on ODS-5 volumes. A file on an ODS-5 volume with special characters in its name must be given an ODS-2-compliant name if it is copied to an ODS-2 volume.

3.4 DCL Support for ODS-5 Volumes

When using extended file names on the DCL command line, you need to set the parsing style to EXTENDED to accept and display extended file specifications. The default setting is TRADITIONAL. To set the parsing style, enter the command:


$ SET PROCESS/PARSE_STYLE=EXTENDED 

Note

DCL lexical functions use the DEC Multinational character set, which is different from the ISO Latin-1 character set used for file names on an ODS-5 disk. This can lead to unexpected results if, for example, you use the DCL function F$EDIT to upcase a filename. F$EDIT will not upcase DEC MCS characters with hexadecimal values of F0, F7, FE, and FF.

See Section 3.4.1 for more information about changing the DCL name parsing style.

3.4.1 Using the Extended File Specifications Parsing Feature in DCL

Sections 3.4.1.1, 3.4.1.2, and 3.4.1.3 describe how to control the DCL name parsing style, both on the command line and in a command procedure.

3.4.1.1 Enabling the Extended File Name Parsing Style

On OpenVMS Alpha systems, you can tell DCL to accept ODS-5 file names on a per process basis by entering the following command:


$ SET PROCESS/PARSE_STYLE=EXTENDED 

Note that this command has no effect on an OpenVMS VAX system.

After you enter the command, DCL accepts a file name such as the following:


$ CREATE MY^[FILE 

The circumflex (^) character is used as an escape character to tell DCL to treat the next character (in this case, a left bracket) as a literal character in the name, rather than as a delimiter.

For additional information, see the description of the SET PROCESS/PARSE_STYLE command in the OpenVMS DCL Dictionary: N--Z.

3.4.1.2 Resetting the Default File Name Parsing Style

The default DCL parsing style for file names is for ODS-2 style file names. To reset DCL to the default parsing style, enter the following command:


$ SET PROCESS/PARSE_STYLE=TRADITIONAL 

After you enter this command, DCL accepts only ODS-2 file name formats.

3.4.1.3 Switching Between File Name Parsing Styles

A command procedure that requires a specific file name parsing style can include commands within the procedure to switch between styles. The following command procedure saves the current parsing style, sets the parsing style to TRADITIONAL, performs (unspecified) commands, then restores the saved parsing style.


$ original_style= f$getjpi("","parse_style_perm") 
$ SET PROCESS/PARSE_STYLE=TRADITIONAL 
   .
   .
   .
$ SET PROCESS/PARSE_STYLE='original_style' 

The first command equates 'original_style' with the current parse style. The second command sets the parsing style to TRADITIONAL. The last command resets the parsing style to the original style.

3.4.2 Using Extended File Names in DCL Command Parameters

Command procedures that use file names as parameters can produce different results in an ODS-5 environment.

You can switch from the TRADITIONAL to the EXTENDED parsing style, and this section describes the following areas that may be affected if you choose to do so:

See Section 3.4.1 for more information on switching between parsing styles.

3.4.3 Command Procedure File Specification

If indirect command procedures are used, you may need to put quotes around some procedure arguments.

The following examples show the differences in output between TRADITIONAL and EXTENDED parsing styles when using the same command file, SS.COM:


       $ create ss.com 
       $ if p1 .nes. "" then write sys$output "p1 = ",p1 
       $ if p2 .nes. "" then write sys$output "p2 = ",p2 
       $ if p3 .nes. "" then write sys$output "p3 = ",p3 

3.4.4 Case Preservation and $FILE

DCL attempts to preserve the case of file specifications. It can do this only for commands defined with the Command Definition Utility (CDU). DCL preserves case for any item defined in the command definition file (.CLD) with the $FILE parse type.

Refer to the Command Definition Utility manual for more information.

3.4.5 Ampersand Versus Apostrophe Substitution

You can use ampersand (&) substitution, as opposed to apostrophe substitution, to preserve case during traditional parsing.

The following traditional parsing example shows a series of commands that change the case of a character string:


       $ set process/parse_style=traditional 
       $ x = "string" 
       $ define y 'x' 
       $ sho log y 
          "Y" = "STRING" (LNM$PROCESS_TABLE) 
       $ define y &x 
       %DCL-I-SUPERSEDE, previous value of Y has been superseded 
       $ sho log y 
          "Y" = "string" (LNM$PROCESS_TABLE) 

Note that the use of the ampersand (&) preserved the case of the character string assigned to the x variable.

Apostrophe substitution takes place before the command line is set to uppercase, and ampersand substitution takes place after the command line is set to uppercase.

The following extended parsing example shows the same series of commands:


       $ set process/parse_style=extended 
       $ define y 'x' 
       %DCL-I-SUPERSEDE, previous value of Y has been superseded 
       $ sho log y 
          "Y" = "string" (LNM$PROCESS_TABLE) 
       $ define y &x 
       %DCL-I-SUPERSEDE, previous value of Y has been superseded 
       $ sho log y 
          "Y" = "string" (LNM$PROCESS_TABLE) 

Note that both character strings for the y variable are returned lowercase. This happens because the DEFINE command uses $FILE, which preserves the case.

Ampersand substitution can therefore be used to specify EXTENDED file names even though the parsing style is set to TRADITIONAL, as shown in the following example:


$ set process/parse=extended 
$ cre file^ name.doc 
Contents of an ODS5 file 
 Exit 
 
$ set process/parse=traditional 
$ a = "file^ name.doc" 
$ type file^ name.doc 
%DCL-W-PARMDEL, invalid parameter delimiter - check use of special characters 
 \^NAME\
$ type 'a' 
%DCL-W-PARMDEL, invalid parameter delimiter - check use of special characters 
 \^NAME\
$ type &a 
Contents of an ODS5 file 

Note

Ampersand substitution does not work for foreign commands.

3.5 DCL Commands and Utitlities

Some DCL commands and OpenVMS utilities have been modified to take advantage of all the features of extended file names. These utilities and commands accept and handle extended file specifications without error and without modifying their expected case.

Other DCL commands and OpenVMS utilities have had little or no modification to take advantage of extended file names. These utilities and commands are expected to handle most of the attributes of extended file specifications (such as new characters and deep directory structures) correctly.

See Table 3-3 for the new features in DCL to support Extended File Specifications.

Section 2.1 fully defines the different levels of support for extended file names provided by DCL commands and OpenVMS utilities in OpenVMS Version 7.2.

The following DCL commands and OpenVMS utilities provide full support for extended file names:

Table 3-3 lists the new features in DCL to support Extended File Specifications.

Table 3-3 DCL New Features
DCL Command New Features
COPY Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
DELETE Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
DIRECTORY Added the following items:
  • Qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
  • Display item to /FULL to display Client Attributes
DUMP Added the following items:
  • Display item to /DIRECTORY to display Name type attribute
  • Display item to /HEADER to display new attributes
  • Qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
EXCHANGE NETWORK Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
F$FILE_ATTRIBUTES Lexical Added new item codes: FILE_LENGTH_HINT, VERLIMIT, DIRECTORY
F$GETDVI Lexical Added new type to the ACPTYPE item code.
F$GETJPI Lexical Added new item codes: PARSE_STYLE_PERM and PARSE_STYLE_IMAGE
INITIALIZE Added a new qualifier: /STRUCTURE=5 device-name[:] volume-label
PRINT Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
PURGE Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
RENAME Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
SEARCH Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
SET ACL Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
SET DEFAULT Modified the directory-spec parameter to accept ODS-5-compliant file specifications.
SET DIRECTORY Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
SET FILE Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
SET PROCESS Added a new qualifier: /PARSE_STYLE=(keyword), where keywords are TRADITIONAL and EXTENDED.
SET SECURITY Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
SET VOLUME Added a new qualifier: /STRUCTURE_LEVEL=5
SHOW DEVICE/FULL Updated the display information to show the disk structure level.
SUBMIT Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED
TYPE Added new qualifier, /STYLE, with new keywords, EXPANDED and CONDENSED

For detailed information about the enhancements made to the OpenVMS operating system and utilities in support of Extended File Specifications, see the OpenVMS DCL Dictionary: A--M, the OpenVMS DCL Dictionary: N--Z, and the OpenVMS Utility Routines Manual.

3.6 Displaying Files with Extended Names

Some DCL commands, as listed in Table 3-3, have the following new qualifier to control the display of extended file names:


/STYLE= [CONDENSED | EXPANDED]  

This qualifier allows you to control how the modified DCL commands display extended file names and any associated prompts.

The keyword CONDENSED displays the file specification as it is generated to fit within the 255-byte character string limit imposed by many utilities. When necessary, this file specification may contain a DID abbreviation or a FID abbreviation. The keyword EXPANDED displays the file specification that is stored on disk in full and does not contain a DID abbreviation or a FID abbreviation.

The following sections contain examples of using the /STYLE qualifier with the DIRECTORY, TYPE, PURGE, and DELETE commands.

3.6.1 DIRECTORY Command

The DIRECTORY command allows you to select in what format the file name is displayed when viewing the contents of a directory:


DIRECTORY/STYLE=(keyword[,keyword]) 

The DIRECTORY command by default displays file names as you see in the following example, using DIDs where necessary and switching back to the full directory specification where DIDs are not necessary:


$ DIRECTORY 
 
Directory TEST$ODS5:[23,1,0] 
 
abcdefghijklmnopqrstuvwxyABCDEFGHIJKLMNOPQRSTUVWXYabcdefghijklmnopqrs 
tuvwxyABCDEFGHIJKLMNOPQRSTUVWXYabcdefghijklmnopqrstuvwxyABCDEFGHIJKLM 
NOPQRSTUVWXY.abcdefghijklmnopqrstuvwxyABCDEFGHIJKLMNOPQRSTUVWXYabcdef 
ghijklmnopqrst;2 
 
Total of 1 file. 
 
Directory TEST$ODS5:[TEST.RANDOMTESTING.RANDOM] 
 
AddressFiles.DIR;1  LOGIN.COM;3         test.1;1       test^.1.clue;1 
Travel.LIS;1        whee.;5       work.dat;8 
 
Total of 8 files. 
 
Grand total of 2 directories, 9 files. 

The DIRECTORY command, using both keywords with the /STYLE qualifier, produces a two-column directory list. Each column lists all the file names. The CONDENSED column contains any needed DIDs or FIDs, while the EXPANDED column contains full directory names and file names. Any file errors are displayed in the CONDENSED column. The following example shows the results of the DIRECTORY command with the /STYLE qualifier taking both keywords.


$ DIRECTORY/STYLE=(CONDENSED,EXPANDED) 
 
Directory TEST$ODS5:[23,1,0]        TEST$ODS5:[TEST.RANDOMTESTING.RANDO 
                                    M] 
 
abcdefghijklmnopqrstuvwxyABCDEFGHIJ abcdefghijklmnopqrstuvwxyABCDEFGHIJ 
KLMNOPQRSTUVWXYabcdefghijklmnopqrst KLMNOPQRSTUVWXYabcdefghijklmnopqrst 
uvwxyABCDEFGHIJKLMNOPQRSTUVWXYabcde uvwxyABCDEFGHIJKLMNOPQRSTUVWXYabcde 
fghijklmnopqrstuvwxyABCDEFGHIJKLMNO fghijklmnopqrstuvwxyABCDEFGHIJKLMNO 
PQRSTUVWXY.abcdefghijklmnopqrstuvwx PQRSTUVWXY.abcdefghijklmnopqrstuvwx 
yABCDEFGHIJKLMNOPQRSTUVWXYabcdefghi yABCDEFGHIJKLMNOPQRSTUVWXYabcdefghi 
jklmnopqrst;2                       jklmnopqrst;2 
AddressFiles.DIR;1                  AddressFiles.DIR;1 
LOGIN.COM;3                         LOGIN.COM;3 
test.1;1                            test.1;1 
test^.1.clue;1                      test^.1.clue;1 
Travel.LIS;1                        Travel.LIS;1 
whee.;5                             whee.;5 
work.dat;8                          work.dat;8 
 
Total of 8 files. 

DIRECTORY can either use one or both keywords with the /STYLE qualifier.

3.6.2 TYPE Command

The TYPE command accepts the /STYLE qualifier to select the file name format displayed in system messages while typing files and prompts.


$ TYPE/STYLE=(keyword) 

This example shows the use of the TYPE command with the TYPE=EXPANDED and CONFIRM qualifiers.


$ TYPE/CONFIRM/STYLE=EXPANDED abc*.*rst;2 
TYPE TEST$ODS5:[TEST.RANDOMTESTING.RANDOM]abcdefghijklmnopqrstuvwxyzABCDEF 
GHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYabc 
defghijklmnopqrstuvwxyzGHIJKLMNOPQRSTUVWXYabcdefghijklmnopqrst;2 ? [N]: Y 
 
[System outputs contents of file] 

3.6.3 DELETE Command

The DELETE command accepts the /STYLE qualifier to select the file name format for display purposes when performing the command.


$DELETE/STYLE=(keyword) 

In the following examples, the ellipsis (...) represents many characters within the file name. These examples use the CONFIRM qualifier to generate a system message.

DELETE using default (CONDENSED):


$ DELETE/CONFIRM abc*.*.* 
DELETE TEST$ODS5:[TEST.RANDOMTESTING.RANDOM]abcAlphabet.stuff;1 ? [N]: Y 
DELETE TEST$ODS5:[23,1,0] abcdefg. . .QRSTUVWXY.abcdefg. . .tuvw 
xy;1 ? [N]: Y 
 

When the full file specification is required, use the DELETE command with the /STYLE qualifier and the EXPANDED keyword:


$ DELETE/CONFIRM/STYLE=EXPANDED abc*.*.* 
DELETE TEST$ODS5:[TEST.RANDOMTESTING.RANDOM]abcAlphabet.stuff;1 ? [N]: Y 
DELETE TEST$ODS5:[TEST.RANDOMTESTING.RANDOM]abcdefg. . .QRSTUVWX 
Y.abcdefg. . .tuvwxy;1 ? [N]: Y 
 


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  
6536PRO_003.HTML