OpenVMS Fundamentals

Key Terms


The key terms described in this section are:

Logical Names

A logical name can be assigned to a physical device (such as a terminal, disk drive, printer, etc.), a group of files known as a volume, or a single file. Once a logical name is assigned, it can be used instead of the physical device name or file name. For example, suppose that you log into the system on a terminal. Each terminal is identified to the system by a device name, for example, TTA3:. When you log in, the system will assign the logical name SYS$OUTPUT (system output) to the device TTA3:. Thereafter, any references to SYS$OUTPUT will be routed to your terminal. Logical names allow the system to execute identical procedures for many users, the only difference being the devices to which the logical names refer.

You can define your own logical names using the DEFINE or ASSIGN commands. Logical names allow you to write and use programs that are independent of specific devices or files. At run time, you can use the DEFINE command to associate a logical name with a file or device. When VMS runs the program, it will see the logical name, look up the logical name in a table, and use the appropriate file or device. System defaults are assigned in this way to relieve users of the need to specify in detail each and every aspect of system operation.

A DEFINE command takes two parameters, the first is the alias by which you want to refer to something, and the second is the device, volume, or file that will be associated with the alias. For example, you may want to give the logical name MYFILE to the file PAPER.TXT. This could be done with the following command:

$ DEFINE MYFILE PAPER.TXT
After typing this command, you can refer to MYFILE and the system will immediately perform the specified operation on PAPER.TXT. For example, to edit the file, you could type:

$ EDIT MYFILE
At the time you login, you can check to see what logical names are assigned by default. To
do this, your first command in a session would be:

$ SHOW LOGICAL
A list of assigned logical names will be displayed in the following order:

Next to each logical name will be its equivalence name, or the device to which it is equated.

An example of a logical name assigned to your process is SYS$LOGIN. This logical name translates to your account's default login device and directory. To see how SYS$LOGIN is set for your account, type:

$ SHOW LOGICAL SYS$LOGIN
Logical names are a powerful tool. Consult Chapter 13 of the OpenVMS User's Manual for a further introduction to logical names. For assistance with the DEFINE statement, use the system HELP facility by typing:

$ HELP DEFINE

Logical Name Tables

Logical names are stored in tables. The system maintains four tables which are based on accessibility:

It is also possible to create your own logical name tables. See Chapter 13 of the OpenVMS Users Manual, for more information.

Search Lists

Search lists are logical names with multiple equivalence names. They can be used anywhere that normal logical names are used, and are usually used to define multiple areas to be searched for files. They are set up just like logical names, except you specify two or more equivalence names. For example:

$ DEFINE SEARCH_MY_FILES DISK$USER0:[FOO],DISK$USER1:[BAR]
This command establishes a logical name for two directories. It would then be possible to see the names of all files in both directories by using the logical name in conjunction with the DIRECTORY command, as shown in Figure
2.5.



















Figure 2.5: Using a Search List

This command would cause the system to first give a directory listing of the files in DISK$USER0:[FOO] followed immediately by a directory listing of the files in DISK$USER1:[BAR]. These search list logical names may be used with most DCL commands.


Be careful when using search lists with the DELETE command, or files in all equivalence name areas may be removed.


Symbols

Symbols are words or commands that refer to complete commands or procedures. Instead of entering the entire command or executing a procedure, you need enter only the symbol. The system will associate the symbol with the proper procedure and execute it. Thus, if the symbol, TIME, is defined to identify the command SHOW TIME then each time you type the command TIME the system will respond as if the entire SHOW TIME command had been entered. For example:

$ TIME :== SHOW TIME 
$ TIME  
4-OCT-1990 18:34:12 
At login, many symbols are defined for each user. For instance, the system defines the command, LOGOUT, to be equivalent to running the system procedure that concludes a terminal session. While you need only type LOGOUT, the system will run the entire procedure necessary to end the session. Symbols are another method of simplifying and customizing VMS for each user.

To examine the default defined symbols, type:

$ SHOW SYMBOL/GLOBAL/ALL 
The system will display each symbol that it defined for you and the equivalent procedure or command that will be executed when you type that symbol.

Like logical names, symbols can be defined by each user. Symbols are defined by typing the symbol name followed by :== and the command to which it is equivalent. For example, suppose you had a directory that contained many files with a .DAT file type. The symbol LIST could then be defined to provide a directory of only those files, using the command:

$ LIST:== DIRECTORY *.DAT;* 
Thereafter, whenever you type the command, LIST, the system would examine a symbol table, find the command linked with LIST, and execute the command, resulting in a directory listing of all files with a .DAT file type. Using symbols can simplify the process of directing the system to perform tasks.

If you find particular symbols and logical names useful and want to have them created each time you login to VMS, put them into your LOGIN.COM file. See "Defining Your Environment" on page 35.


Do not define symbol names that are the same as standard DCL command names otherwise you will not be able to use the commands when you need them.


Processes

When you log in to a VMS system, the system creates an operational environment known as a process. The system executes processes, which in turn execute your programs or procedures. You can check information about your process by typing:

$ SHOW PROCESS 
For even more detailed information about a process, you would use the /ALL qualifier as shown in the example in Figure
2.6.



Figure 2.6: Displaying Information About Your Process

When VMS creates a process, it assigns certain characteristics known as defaults. A default, both here and in various other contexts, is a value that will be used by the system whenever you do not specifically specify a value. For example, one of the characteristics of a process is a default disk and directory name used to catalog created files. Whenever a file is referenced without a specific disk or directory name, the system will use the default disk and directory name assigned to the process. The other important default characteristics of a process are:

[101,124]

Occasionally you may start a process that you are unable to end. You can remove any process you have created by following these steps:

  1. Locate all processes for your username with the command:

   $ SHOW USER/FULL your_username
This command lists processes for your username across all nodes in the cluster.


You don't want to stop the process you are currently using. Find your current process by typing:
$ SHOW PROCESS/ALL
Make sure the PID you intend to stop is not the one displayed in a show process/all listing.


  1. Select the process you want to stop and force it to abort using the following command. The value that you should use for the ID is found under the heading PID in the listing that you would have gotten above.

   $ STOP/ID=nnnnnnnn

Defaults

A default is a value supplied by VMS when you do not specify a value. For example, if you do not specify the number of columns in a brief display as a qualifier in the DIRECTORY command, the system uses the default of 4. If you do not explicitly state a value, VMS assumes you have chosen the default.

When you login, the system creates a number of logical names for you. These defaults tell the system where to look for user input (SYS$INPUT), where to send output (SYS$OUTPUT), and numerous other details of system operation. Two other important defaults are:

   $ SHOW LOGICAL SYS$PRINT
   $ DEFINE sys$print put_queue_name_here
For example:

   $ DEFINE sys$print 3clps_ansi
Logical Names
Logical Name Tables
Search Lists
Figure 2.5: - Using a Search List
Symbols
Processes
Figure 2.6: - Displaying Information About Your Process
Defaults

Generated with CERN WebMaker