Getting Started as an MPE/iX Programmer Programmer's Guide: HP 3000 Computer MPE/iX Computer Systems > Chapter 1 OVERVIEWGiving Commands to MPE/iX |
|
There are several ways to command MPE/iX: commands, command files, and user-defined commands (UDCs). These alternatives are described in the subsections below and shown in Figure 1-4 “Commanding MPE/iX”. MPE/iX commands perform many different functions: managing files, compiling programs, executing programs, and so on. Many commands actually invoke subsystems, causing other programs to run. Some commands require that you have capabilities on the system beyond that of the normal user. For example, they may require Account Manager (AM), System Manager (SM), or System Supervisor (OP) capability. In a session, the command interpreter uses a leading colon (:) as a prompt character to indicate that it is expecting you to enter an MPE/iX command. In jobs, you enter the leading colon before an MPE/iX command to identify it. In both cases, the system disregards blanks between the leading colon and the MPE/iX command. The list below shows some common MPE/iX commands grouped according to similar function.
For detailed information, refer to the MPE/iX Commands Reference Manual Volumes 1 and 2 (32650-90003 and 32650-90364). Some commands require or can accept parameters. Parameters given in command syntax can have two components:
For detailed information on the conventions for documenting command syntax (including parameters), refer to "Notation Conventions" in the front of this manual. MPE commands can have positional or keyword parameter lists. The characteristics of a positional parameter list are:
For example:
The characteristics of a keyword parameter list are:
For example,
is the same as
The maximum number of characters in a command is 256. You can continue a command on more than one line by entering an ampersand (&) as the last nonblank character on the line to be continued. Enter the ampersand immediately before or after a delimiter (, ; . = / or blank). For example:
MPE/iX provides an on-line help facility to aid you in using MPE/iX commands. You can easily experiment with it by typing HELP at the colon (:) prompt. MPE/iX provides a correction facility to correct the previous MPE/iX command or modify it to use again. The :REDO command allows you to modify the previously displayed command without having to retype the entire command. It does not cancel any action performed by the previously displayed command. Several generic characters can be used like wildcards in specifying a file set or volume set. This is especially useful in listing operations, to avoid entering exact names when you are performing the operation on many files with similar names. Generic characters allow you to process an entire set of files in one MPE/iX command, by specifying a string or character that is common to all members of the set. You can use generic characters with some MPE/iX commands. The generic characters (or portions of names) are described as follows:
Examples of wildcard use are:
Command files and user-defined commands (UDCs) are files that allow programmers to customize their environment. MPE/iX accepts numbered and unnumbered files composed of commands. The commands can consist of any number of MPE/iX commands. Each command line can be a maximum of 279 characters long. To continue a line, place an ampersand (&) at the end of the line, after the last nonblank character. A command line can be continued up to a maximum of ten lines, not exceeding a total of 279 characters. The maximum number of characters on a line is 80. A Command File is a file that contains a single command definition. It is executed by specifying its file name. A Command File does not have a command name and is not entered in a catalog directory. For example, entering :COB85XL, followed by a source file name, executes a command definition that invokes the COBOL II/XL compiler. A User-Defined Command (UDC) file is a text file that contains one or more command definitions and with a name for each definition. Each definition is a UDC. You can use a UDC to perform several MPE/iX commands in succession by issuing only the name of the UDC. You can also use a UDC to disable an MPE/iX command. You can create the UDC file by using Editor or TDP. Each UDC file command definition in a UDC has the following components:
Figure 1-5 “UDC File Example” shows an example of a UDC file containing two UDCs. This UDC file defines two UDCs that accept parameters when executed. The first UDC purges one or more files. The second one runs a program. The following rules apply to parameter specifications:
To activate the UDCs in a UDC file, the file must be identified to MPE/iX as a catalog. Use the :SETCATALOG command to catalog a UDC file. Each time you execute :SETCATALOG, the specified file becomes the only enabled UDC file, unless you specify that more files should be appended. An enabled UDC file is frequently called a UDC catalog. Executing :SETCATALOG without any file names disables all UDC catalogs. You must first disable the UDC catalog to save a new version of a it to the same file name. If you do not want to disable the UDC catalog, you can save a new version of it under a different file name. Executing :SHOWCATALOG shows a list of all UDC catalogs (enabled UDC files) and the UDCs within them. The file named COMMAND.PUB.SYS contains a table of UDC users and catalogs. Purging or putting a lockword on this file disables all UDCs. When you use a UDC, catalogs are searched for the specified command name in the following order of catalogs set at:
The order in which UDC catalogs are searched within a level is determined by the order in which they were specified in the :SETCATALOG command. Command definitions are sequentially searched for execution in order of appearance in a UDC catalog. System resources are required to manage UDCs for each session in which they are enabled. UDCs that are automatically executed at log on cause an increase in the time required to complete the log on. A situation where many users have several UDC catalogs (enabled UDC files) can have a severe negative impact on system performance. For detailed information on command files and UDCs, refer to Command Interpreter Access and Variables Programmer's Guide (32650-90011). |