![]() |
![]() |
|
|
![]() |
![]() |
Understanding Your System: HP 3000 Series 9X8LX Computer Systems > Chapter 4 Here I Am— What Can I Do?![]() Starting Programs |
|
You have three ways of starting—sometimes called running—any program on your MPE/iX system.
It might seem odd to have three ways of starting (running) a program. On earlier MPE systems, the only way to start a program was to use the RUN command. As the system evolved, programming engineers added other methods, to provide more flexibility and to manage the growing complexity of the system and its facilities. Which method you use is usually a matter of choice. However, under some circumstances, one method will work, and another will not. RUN is one of the commands built into the MPE/iX operating system. Its chief purpose—but not the only one—is to start a program.
Consider a program called AUDIT that resides in the REPORTS group of the FINANCE account. Its fully qualified name is AUDIT.REPORTS.FINANCE.
Wherever you log on, you can run AUDIT this way:
This way of starting a program works for any program, if you know the fully qualified name of the program file, and if the program is not restricted from general use by some method of protection. Notice, though, that
will not work, unless you are logged on in the group where the AUDIT program is found (in the REPORTS group of the FINANCE account in this example). However, if you are logged on as JOHN.FINANCE,REPORTS, you can run AUDIT this way:
This "first name only" way of running a program is called an implied RUN.
If you use an implied RUN (AUDITReturn), the computer follows a set of instructions called a path. These instructions tell the computer where to search for programs (or any executable file). If the program resides in an account (or in a group) not mentioned in the path instructions, the computer will not find that program. By default the path instruction tells the computer to search in these places, in this order:
You can discover what path is set for you by entering this:
HPPATH is a system variable (an area of computer memory) that contains the path instruction. The SHOWVAR command displays the setting of this—or any other—system variable. SHOWVAR @Return will display the settings of all of the system variables for your session. The SETVAR command allows you to change the path along which the computer searches for executable files. You may use the SETVAR command to change the value of a system-defined variable called HPPATH. If the program that you want to run is not found along the path instructions, you will need to use RUN and specify the fully qualified name of the program. Still another limitation on using an implied RUN name might be the very name of the program you want to run. The computer follows a set of priorities—a search priority—in its hunt for executable files. The priority of the search, from highest to lowest, is this:
User-defined commands are somewhat like command files, but they are an advanced topic in using the MPE/iX operating system. You will find information about user-defined commands in Using the 900 Series HP 3000:Advanced Skills (32650-60039). You may order this book through your Hewlett-Packard representative. Other books that might be of interest are mentioned in the bibliography found in the book Task Reference - HP 3000 Series 9X8LX (B3820-90009). A program called MYPROG will come into conflict if there is a user- defined command called MYPROG or if there is a built-in command called MYPROG (there is no such built-in command, by the way).
Only after it has exhausted these possibilities will the computer continue its search for the program called MYPROG. One of the MPE/iX built-in commands is called SHOWME. If there is also a program called SHOWME on your system, you will encounter difficulty in trying to run the program SHOWME. If you enter SHOWMEReturn, the operating system will execute the command SHOWME and fail to execute the program called SHOWME. There are two solutions to this problem.
If you wish to execute a program called SHOWME and not the command called SHOWME, you may use another command, XEQ, to execute the program SHOWME:
XEQ is a shorthand way of writing the English word "execute," and it has other applications that are discussed in Chapter 6 “Behind the Scenes”. The XEQ command bypasses the user-defined commands and the built-in commands before searching for an executable file. |
![]() |
||
![]() |
![]() |
![]() |
|||||||||
|