Updated: 11 December 1998 |
OpenVMS User's Manual
Previous | Contents | Index |
An OpenVMS Cluster device name includes the name of the node to which the device is attached and the physical device name, separated by a dollar sign ($). For example, ROXXY$DUA1 refers to disk DUA1 on node ROXXY.
As a general rule, always use a node allocation class device name to identify dual-pathed OpenVMS Cluster disks. It is the only name that all OpenVMS Cluster nodes recognize at all times.
For more information about using the device name format in OpenVMS Cluster environments, see OpenVMS Cluster Systems.
If a device is dual pathed (connected to two nodes), specify the OpenVMS Cluster device name in the following format:
$node-allocation-class$ddcu |
node-allocation-class | A value assigned to the nodes connecting a dual-pathed device. For example, $1$DJA16 identifies a disk that is dual pathed between two nodes that both have a node allocation class value of 1. |
dd | Represents device code of the hardware device type (for example, the device code DK represents an RZ23 disk). |
c | Identifies the hardware controller to which the device is attached. The controller designation, along with the unit number, identifies the location of the device within the hardware configuration of the system. Controllers are designated with alphabetic letters A to Z. |
u | Uniquely identifies the unit number of a device on a particular controller. Unit numbers are decimal numbers from 0 to 65535. |
12.7 Dismounting Volumes
When you are done with the files on a disk or tape volume, you can use
the DISMOUNT command to dismount the volume. Before a volume is
dismounted, the DISMOUNT command checks for conditions that could
prevent the dismount from completing. For example, if the volume
contains installed swap and page files, installed images, or open user
files, DISMOUNT displays an error message indicating that the volume
cannot be dismounted.
By default, the DISMOUNT command automatically unloads the volume from the drive. If you plan to mount or initialize a volume again after you dismount it, you can save time and eliminate unnecessary handling of that volume by using the /NOUNLOAD qualifier. For example:
$ DISMOUNT/NOUNLOAD MTA1: |
In this example, the magnetic tape volume is logically dismounted and the tape is rewound but the tape remains physically loaded on drive MTA1.
You should always explicitly dismount a volume with the DISMOUNT command before physically unloading the volume. Wait for the drive to unload before you remove the volume. (You can verify that the dismount is complete by entering the DCL command SHOW DEVICES.)
A volume is dismounted and unloaded automatically if you log out of the job from which you had mounted the volume. If the system fails, however, the volume is not automatically dismounted. If the device you are dismounting was allocated with an ALLOCATE command, it remains allocated after it is dismounted with the DISMOUNT command. If the device was implicitly allocated by the MOUNT command, the DISMOUNT command deallocates it.
A logical name can be used in place of another character string to represent system objects such as files, directories, devices, or queues. This chapter includes information about the following:
For additional information about the commands described in this
chapter, refer to the OpenVMS DCL Dictionary or online help.
13.1 Logical Name Characteristics
Logical names have the following characteristics:
In general, when a command accepts a system object, the command checks whether the name you provide is a logical name. If the name is a logical name, the system replaces the logical name with its actual value and executes the command.
In the following example, the logical name COMS is created to represent the directory DISK7:[WALSH.COMMAND_PROC]:
$ DEFINE COMS DISK7:[WALSH.COMMAND_PROC]: |
The logical name COMS can then be used in DCL commands, as shown in the following examples:
$ SET DEFAULT COMS |
$ TYPE COMS:PAYROLL.COM |
The system creates a set of systemwide logical names for you when you start the system and log in. These logical names allow you to refer to commonly used files or devices without using their physical device names. For a list of these names, see Section 13.9.3.
Every time you log in, the system creates a group of logical names for your process and places these names in your process table. For a list of these names, see Section 13.9.1.
To list your operating system's programs, you do not need to know the name of the disk and directory where these programs are stored. Instead, you can use the logical name SYS$SYSTEM, as follows:
$ DIRECTORY SYS$SYSTEM |
The logical name SYS$LOGIN refers to your default device and directory when you log in. If you have changed your current defaults by using the SET DEFAULT command, you can use the following command to display a file from your initial default directory:
$ TYPE SYS$LOGIN:DAILY_NOTES.DAT |
You can create logical names with either the DEFINE command or the ASSIGN command. In this chapter, the DEFINE command is used in the examples.
In general, you create logical names in your process table. Usually, you define logical names in a login command procedure (LOGIN.COM) so you can use the logical name each time you log in. You can also create logical names interactively. However, you can use these logical names only while your current process is active.
The logical names you create in your process table are not available to other users' processes. The system manager or another privileged user can create names in shareable tables, which are accessible to other users. Group and system tables are examples of shareable tables.
For more information about shareable tables, see Section 13.9.4.
13.3.1 Using the DEFINE Command
The format for defining a logical name with the DEFINE command is as follows:
DEFINE logical-name equivalence-string[,...] |
You can use the same format to create logical names for node names, file specifications, device names, application-specific information, or for other logical names.
By default, the DEFINE command places logical names in your process logical name table (see Section 13.8), where the logical name is available only to your process and subprocesses. If you want to add logical names to a different logical name table, you can specify a different table with one of the following qualifiers: /JOB, /GROUP, /SYSTEM, or /TABLE=table_name. The first three qualifiers specify the default job, group, and system logical names tables, respectively. The /TABLE=table_name can be used to specify any type of table and is the only qualifier to use when specifying a clusterwide table.
In the following example, the command creates the logical name WORKFILE and equates it to the equivalence string DISK2:[WALSH.REPORTS]WORK_SUMMARY.DAT:
$ DEFINE WORKFILE DISK2:[WALSH.REPORTS]WORK_SUMMARY.DAT |
After you define WORKFILE as a logical name, you can use the logical name interchangeably with the equivalence string.
In the next example, the command creates the logical name MY_Q for the print queue BLDGC_LPS20_ANSI:
$ DEFINE MY_Q BLDGC_LPS20_ANSI |
You could then use the following command to print the file FABLES.TXT to the BLDGC_LPS20_ANSI print queue:
$ PRINT/QUEUE=MY_Q FABLES.TXT |
The next example shows the use of the /TABLE=table_name qualifier to create a logical name in a table other than the process logical name table. By specifying LNM$SYSCLUSTER, the logical name is placed in the default clusterwide table, LNM$SYSCLUSTER_TABLE, and is therefore accessible to every user on the cluster.
$ DEFINE/TABLE=LNM$SYSCLUSTER CUSTOMERS DISK1:[CUSTOMER_VISITS]CUSTOMERS.TXT |
You can use logical names in command procedures to perform file I/O (input and output). When you open a file with the OPEN command, you can also create a logical name for the file. Subsequent READ, WRITE, and CLOSE commands can use the logical name instead of the actual file specification to refer to the file.
In the following example, the OPEN command creates the logical name INFILE and the CLOSE command deletes it:
$ OPEN INFILE DISK3:[WALSH]DATA.DAT $ READ INFILE RECORD $ CLOSE INFILE |
Observe the following rules when you create a logical name with the DEFINE command:
The following commands display the file DISK1:[SALES_STAFF]PAYROLL.DAT:
$ DEFINE PAY DISK1:[SALES_STAFF]PAYROLL.DAT $ TYPE PAY |
$ DEFINE PAY_FILE DISK1:[SALES_STAFF]PAYROLL $ TYPE PAY_FILE:*.DAT |
$ DEFINE PAY_DIR DISK1:[SALES_STAFF] $ TYPE PAY_DIR:PAYROLL.DAT |
$ DEFINE PAY_DISK DISK1: $ TYPE PAY_DISK:[SALES_STAFF]PAYROLL.DAT |
When you create a logical name, you can specify translation attributes that modify how the system interprets the equivalence string.
To apply translation attributes to an equivalence string, use the /TRANSLATION_ATTRIBUTES qualifier to the DEFINE command. This is a positional qualifier. Depending on where you place it on a command line, it can apply translation attributes to all equivalence strings or only to certain ones.
In the following example, the device name DJA3: is concealed with the logical name DISK:
$ DEFINE/TRANSLATION_ATTRIBUTES=CONCEALED DISK DJA3: $ SHOW DEFAULT DISK:[SAM.PUP] $ SHOW LOGICAL DISK "DISK" = "DJA3" (LNM$PROCESS_TABLE) |
The logical name DISK represents the physical device DJA3. Thus, the SHOW DEFAULT command displays the logical name DISK rather than the physical device name DJA3. The SHOW LOGICAL command reveals the translation of DISK.
The CONCEALED attribute causes system messages to display the logical name rather than the physical name of a device. Typically, you use the CONCEALED attribute with logical names that represent physical devices. Using concealed devices lets you write programs, write command procedures, and perform other operations without being concerned about which physical device holds the disk or tape. It also lets you use names that are more meaningful than the physical device names.
The TERMINAL attribute prevents iterative translation of a logical name
(that is, the equivalence string is not examined to see whether it is
also a logical name). The translation is "terminal" (final or
completed) after the first translation.
13.3.5 Access Modes
The OpenVMS operating system has the following four access modes:
You can use the DCL commands DEFINE or ASSIGN to create logical names in the first three modes (user, supervisor, and executive). By specifying different access modes for each logical name definition, you can equate the same logical name to different equivalence strings in the same logical name table. Note that you must have SYSNAM or SYSPRV privileges to create logical names in executive mode in any logical name table.
Logical names created in user mode are temporary. Define a logical name in user mode when you want to use it only for the execution of the next command or image.
In the following example, the logical name ADDRESSES is deleted automatically after the execution of the program PAYABLE:
$ DEFINE/USER_MODE ADDRESSES DISK1:[SAM.ACCOUNTS]OVERDUE.LIS $ RUN PAYABLE |
Supervisor Mode
When you use the DEFINE command without specifying a mode, DCL creates the logical name in supervisor mode.
In the following example, the commands equate the logical name ACCOUNTS to two different equivalence strings in the process logical name table---one in supervisor mode and one in executive mode:
$ DEFINE ACCOUNTS DISK1:[ACCOUNTS]CURRENT.DAT $ DEFINE/EXECUTIVE_MODE ACCOUNTS DISK1:[JANE.ACCOUNTS]OBSOLETE.DAT |
In looking up logical names, all privileged images and utilities such as LOGINOUT bypass the user mode and supervisor mode names and tables. If a logical name is to be used by a privileged image, including a utility, it must be defined in executive or kernel mode in an executive or kernel mode table. Other candidates for logical names defined in executive mode are the names of public directories used by your work group and system resources, such as print queues and system disks.
Only the operating system and privileged programs can create logical
names in kernel mode.
13.3.6 Creating Logical Node Names
You can use a logical node name in place of a network node name or in place of a node name and an access control string. Once you define a logical node name, you can use it to avoid typing (and displaying) your user name and password on the screen.
To define a logical node name, observe the following rules:
Do not place a DEFINE command that includes a password in a file (your login command procedure, for example). If others read the file, they will see the password. |
In the following example, the command equates the logical name BOS to the node name BOSTON and an access control string, where ADAMS is the user name and OLMEKIKA is the password:
$ DEFINE BOS "BOSTON""ADAMS OLMEKIKA""::" |
A file specification can contain both a logical node name (which the system translates at the local node) and a logical device name (which the system translates at the remote node). If you use a logical name to represent a node name only, you must include a double colon (::) when you use the logical name in the node position of a file specification.
After the system translates a logical node name at the local node, it parses the rest of the file specification to determine whether the format is valid.
In the following example, the system translates the logical node name NYC at the local node. It translates the logical device name (DOC:) at the remote node (NEWYRK):
$ DEFINE NYC NEWYRK:: $ TYPE NYC::DOC:[PERKINS]TERM_PAPER.DAT |
To override the access control string in a logical node name, specify both the logical name and an access control string in the command line.
In the following example, the access control string "REVERE HTEBAZILE" overrides the access control string given in the equivalence string for BOS:
$ DEFINE BOS "BOSTON""ADAMS OLMEKIKA""::" $ TYPE BOS"REVERE HTEBAZILE"::RIDE.DAT |
When the system translates a logical node name iteratively, the access control information in the logical node name that is first translated overrides the following access control information. For example, the logical name TEST1 translates to TORONTO"TEST NAMWENLUAP"::DBA1: :
$ DEFINE TORONTO "TRNTO""TEST EIZNEKCAM""::" $ DEFINE TEST1 "TORONTO""TEST NAMWENLUAP""::DBA1:" $ TYPE TEST1:PROC.DAT |
TORONTO is a logical node name, so iterative translation occurs. In other words, the operating system searches the logical name tables until all levels of logical names in a definition are found. However, the access control string in the DEFINE TEST1 logical name assignment overrides the access control string in the DEFINE TORONTO logical node name assignment. Therefore, the TYPE command displays the following file:
TRNTO"TEST NAMWENLUAP"::DBA1:PROC.DAT |
Previous | Next | Contents | Index |
Copyright © Compaq Computer Corporation 1998. All rights reserved. Legal |
6489PRO_029.HTML
|