HPlogo Understanding Your System: HP 3000 Series 9X8LX Computer Systems > Chapter 4 Here I Am— What Can I Do?

Starting Programs

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

TIP: The documentation that accompanies each program explains what it does and how to use it. In particular, the use of HP Easytime/iX is presented in detail in Volume I of Using Your System..

You have three ways of starting—sometimes called running—any program on your MPE/iX system.

  • starting a program with the RUN command

  • starting a program without the RUN command

  • starting a program with the XEQ command

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.

Starting with the RUN command

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.

TIP: You may use the RUN command to start any program that exists on your system—provided that the program is not restricted from general use by some method of protection.

Consider a program called AUDIT that resides in the REPORTS group of the FINANCE account. Its fully qualified name is AUDIT.REPORTS.FINANCE.

TIP: Notice that programs are files, too. They have fully qualified names: AUDIT.REPORTS.FINANCE.

Wherever you log on, you can run AUDIT this way:

   RUN AUDIT.REPORTS.FINANCEReturn

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

   RUN AUDITReturn

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).

Starting without the RUN command

However, if you are logged on as JOHN.FINANCE,REPORTS, you can run AUDIT this way:

   AUDITReturn

This "first name only" way of running a program is called an implied RUN.

TIP: This second method of running a program may not work in each and every case.

Before the computer can start a program, it must first find the program on the disk. Using RUN with the fully qualified name of the program tells the computer specifically where to find that program.

Using an implied RUN forces the computer to search for the program. To do that, it follows a search path

Path restriction

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:

  1. the group in which you are currently logged on

  2. the PUB group of the account in which you are currently logged on

  3. the PUB group of the SYS account

You can discover what path is set for you by entering this:

   SHOWVAR HPPATHReturn

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.

Name restriction

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).

  1. If the computer finds a user-defined command called MYPROG, the computer will execute that first and stop its search.

  2. If, instead, the computer finds a built-in command called MYPROG, the computer will execute that first and stop its search.

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.

  • One solution is to use the RUN command with the fully qualified name of the program (RUN SHOWME.group.account).

  • The other solution is to use the XEQ command.

Starting with the XEQ command

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 SHOWMEReturn

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.

Feedback to webmaster