HP 3000 Manuals

Lesson 1: Creating Command Files [ MPE V to MPE XL: Getting Started ] MPE/iX 5.0 Documentation


MPE V to MPE XL: Getting Started

Lesson 1:  Creating Command Files 

A command file is a simple ASCII or binary data file that contains MPE
commands, program file names, UDC names, and/or other command file names.
It is created by the user in a text editor.  A command file is executed
in the same manner as implied RUN, by entering the file name.

At its simplest, a command file can contain a single MPE command.  For
example, instead of always having to enter the whole command SHOWCATALOG,
you could create a command file called SC that simply contained the one
word SHOWCATALOG. Then, every time you entered SC at the colon (:)
prompt, SHOWCATALOG would execute.  Many MPE V/E users use UDCs for this
purpose; in MPE XL you can use either UDCs or command files.


NOTE Be sure that your command file does not have the same name as an existing UDC or MPE XL command.
Another example of a one-line command file would be one that printed the last three lines of a particular file to the terminal screen. It would look like the following if you created it in EDIT/3000: 1 PRINT FILE=myfile;START=-3 or 1 PRINT myfile,,-3 If this example were to be saved under the file name PR, you would simply type PR at the MPE prompt to execute the file. ______________________________________________________________________ | | | | | :PR | | This file is called | | MYFILE. It is only | | three lines long. | | : | | | ______________________________________________________________________ The example below shows the command file that you have named SH. It executes the command file PR and then executes the MPE command SHOWTIME. 1 PR 2 SHOWTIME To execute, you would enter: _____________________________________________________________________ | | | | | :SH | | This file is called | | MYFILE. It is only | | three lines long. | | WED, NOV 18, 1988, 2:10 PM | | : | | | _____________________________________________________________________ Exercises 1. Choose two MPE commands and create one command file that executes both. Test the command file. 2. Choose a third MPE command and create another command file that executes it. Test this command file. 3. Create a command file that executes both of the command files from exercises 1 and 2. Test this command file.


MPE/iX 5.0 Documentation