Document revision date: 10 November 2000
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

Using DECwindows Motif for OpenVMS


Previous Contents Index


Appendix B
Understanding Files, Directories, and Devices


Although DECwindows is an interface to the VMS operating system, you do not need to know much about the VMS directory structure to use DECwindows. For example, you can be a successful DECwindows user and never leave your own directory. This appendix is designed for new users of VMS as well as those who need a refresher about files and directories and their place in the VMS directory structure.

B.1 Understanding the VMS Directory Structure

In the VMS operating system, information is stored hierarchically. At the top of this hierarchy is the master file directory. Your user file directory and those belonging to other users on your system are listed in this master file directory. Your user file directory---usually called username.DIR---is a file that points to your top-level directory. This top level directory contains the files and subdirectories that you have created or that have been created for you. You perform most of your daily online tasks from your top-level directory.

Your directory structure resembles a family tree. Your top-level directory branches off to files and to subdirectories, which branch still further. Subdirectories let you organize files into meaningful groups. By ascending and descending the directory structure, you can list the contents of your directory and subdirectories and work with the files they contain.


The top-level directory, subdirectories, and files that make up your directory structure are stored on a physical device called a disk. The access path to a file is through the node and device, through a top-level directory, through any subdirectories, and then to the file. If your computer system is part of a network, you can access other directory structures on other nodes.

B.2 About Files

A file can be a document, a program written in a language such as C or Pascal, or a list of street addresses. Among other things, you can view, edit, print, compile, and delete these files. In DECwindows, you use FileView to perform tasks with files.

Every file has a file name or file type to identify it. When you create a file, give it a file name that is meaningful to you. A file name can contain up to 39 characters chosen from the letters A through Z (uppercase or lowercase), the numbers 0 through 9, an underscore (_), a hyphen (-), or a dollar sign ($).

A file type identifies the nature of a file. For example, a file that contains text might have the file type TXT. A program that you can run---or execute---often has the file type EXE.

A file also has a version number. You can have many versions of a file. When you modify that file, the system saves the original file and produces a modified output file. This output file has the same name and type as the original, but the version number is increased by 1. Unless you specify a version number, FileView uses the highest existing version number of that file when it executes a command.

You express this file information in the following format:

filename.type;version

B.3 About Directories and Devices

Files are stored in directories. The file name, type, and version of the files in a directory are recorded in a special kind of file called a directory file. When you list the contents of a directory, the system reads the directory file to obtain the names of the files in that directory.

A directory file has the following format:

directory.DIR;1

Because you cannot edit a directory file, all directory files have a version number of 1.

When you started your first DECwindows session, you were placed in your top-level directory. Your top-level directory, which contains all your files and subdirectories, is stored on a device. Your system manager probably gave your device a name you can easily remember, for example, WORK or DISK$. The device, directory, and file information combine to form a file specification. You use this file specification to identify the path to a file. If you want to access a file located on your device, you can omit the device name from the file specification. If you want to access a file on another node, you must include the node name in the file specification. (You specify a node only if your computer system is part of a network.)

The following file specification tells a user that the file RABBIT.TXT is located in the directory [MCGREGOR] on the device $USERS. The colon and brackets are required elements in the file specification.

$USERS:[MCGREGOR]RABBIT.TXT

A subdirectory name always appears after the directory name and is separated from it by a period. You can append up to seven subdirectory names---each separated from the other by a period---after the directory name. The following file specification tells a user that the file RABBIT.TXT is located in the subdirectory [MCGREGOR.GARDEN] on the device $USERS:

$USERS:[MCGREGOR.GARDEN]RABBIT.TXT

The following file specification tells a user that the file COTTONTAIL.TXT is located in the directory [PETER] on device $PUBLIC on node FLOPSY:

FLOPSY::$PUBLIC:[PETER]COTTONTAIL.TXT

B.4 Using Wildcards in File Specifications

FileView provides commands that let you work with files. The asterisk (*) and percent sign (%) wildcards allow you to apply commands to multiple files rather than to one file at a time. When you use wildcards in a file specification, the command applies to all files whose fields match those of the file specification you enter. (Fields are the individual elements, such as the file name and file type, of a file specification.)

If you choose a command that accepts wildcards, the asterisk (*) and percent sign (%) wildcards can be used in the directory name, file name, and file type fields of a file specification. See Chapter 6 for more information about using wildcards in FileView commands.

B.4.1 Using the Asterisk (*) Wildcard

You can use the asterisk wildcard to represent all or part of a directory name, file name, and file type. You can also use an asterisk to match the entire version number, but not a portion of it.

The following example shows how to use an asterisk to replace fields of a file specification. By choosing FileView's Type command and entering the following file specification in Type's dialog box, all versions and all file types of all files that begin with the word STAFF in the directory [JONES] are displayed. This includes STAFF_VACATIONS.TXT, STAFF.DIS;1, and STAFF.DIS;2.


Files: STAFF*.*;*

When you select the file you want the command to act on, you give FileView an input file specification. For commands that produce output, such as the Copy command, you must also provide the name of the output file specification created as a result of the command. Use the asterisk in the file name, type, and version number fields in the output file specification when you want the output file specification to match the corresponding fields in the input file specification.

In the following example, choosing FileView's Copy command and entering the following file specification in Copy's dialog box copies the latest version of all TXT files in [JONES] to new files in [JONES] with the same name but with a file type of SAV:


From: *.TXT
To: $USERS:[JONES]*.SAV

B.4.2 Using the Percent Sign (%) Wildcard

The percent sign wildcard can be used as a substitute for any single character in the directory, file name, and file type fields. You cannot, however, use the percent sign wildcard in the version number field.

In the following example, choosing FileView's Type command and entering the file specification in Type's dialog box as shown displays the latest versions of all TXT files whose names begin with DISTRICT:


Files: DISTRICT%.TXT

The files DISTRICT1.TXT, DISTRICT2.TXT, and DISTRICT3.TXT would be displayed. The file DISTRICT33.TXT would not be displayed because it has more than one character after DISTRICT; nor would DISTRICT.TXT. The percent sign replaces only one character position, but there must be a character to replace.

B.5 Using Wildcards in Directory Specifications

You can also use two other wildcards, the ellipsis (...) and hyphen (-), to refer to another directory or subdirectory in a directory structure. The ellipsis wildcard allows you to search down the directory hierarchy. The hyphen wildcard permits you to move up the directory structure one level at a time. See Chapter 6 for more information about using the ellipsis and hyphen wildcards.

B.6 About Logical Names

A logical name usually represents a complete or partial file specification, a device name, or another logical name. You can give frequently used files, directories, and devices meaningful logical names that are easier to remember and type than the full file specifications. For example, you can define WORK as a logical name for your device DUA0, or STAFF as a logical name for the file specification $USERS:[JONES.STAFF].

Logical names also let you keep your programs and command procedures independent of physical file specifications. For example, if a command procedure references the logical name ACCOUNTS, you can equate ACCOUNTS to any file on any disk before executing the command procedure.

Logical names can be defined by you or by the system. Logical names and their definitions are kept in tables called logical name tables. VMS provides the following logical name tables:

You can also create your own logical name table that is private to your process or shareable by others.

When you enter a logical name as part of a command line, the system translates the logical name. It does this by searching the job, group, system, and any other logical name tables specified by the logical name LNM$FILE_DEV. (LNM$FILE_DEV is a special system logical name defined in the LNM$SYSTEM_DIRECTORY table. It specifies the search order that FileView and all other VMS components use to translate logical names.)

You can specify that a logical name be defined as concealed. You can conceal logical names that refer to devices or directories.

When you assign a logical name to a device, concealing the logical name allows you to write programs and command procedures and perform other operations without being concerned about which physical device actually holds the disk or tape.

When you assign a logical name to a directory or subdirectory, concealing the logical name can make the directory or subdirectory appear as the master file directory for the current device. This directory or subdirectory to which you assign a concealed logical name is called the root directory. You can then use this root directory as the base from which to access directories beneath it. For example, the top-level directory [JONES] on device DUA0 contains the subdirectory [JONES.STAFF]. If you assign the logical name ME to DUA0:[JONES], you can then refer to the subdirectory [JONES.STAFF] by typing ME:[STAFF].


Appendix C
Troubleshooting Guidelines

This appendix contains information that can help you determine the cause of some common problems that you might encounter while using DECwindows. These problems fall into the following categories: the login box, licensing, FileView, the Window Manager, font access, network access, using applications, Session Manager, DECterm application windows, X terminals, third-party workstations, the X server, the keyboard, the monitor, and the pointer. The last section of the appendix contains general troubleshooting techniques.

After each topic heading, one or more problem statements appear in boldface italic type. Each problem statement is followed by a brief list of possible causes and solutions.

C.1 Login Box

The login box does not appear when the system reboots after an installation.

C.2 License

When you try to start a new session, the dialog box indicates that "No license is active for this software product."

C.3 FileView

When you start FileView, you receive a message indicating that your directory does not exist.

C.4 Window Manager

You cannot iconify any windows. The command buttons are missing from the top of the windows.

C.5 Font Access

Your program can neither access nor find a font.

C.6 Keyboard, Monitor, and Pointer

The spacing and fonts look fine on screen 0 but not on screen 1.

You cannot compose characters on VMS workstations.

The arrow keys move the mouse pointer instead of working with the application.

You cannot dismiss the Pseudo Mouse Mode dialog box without exiting pseudomouse mode.

The top part of the screen goes black and some text messages are visible.


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  
5633PRO_014.HTML