HPlogo Getting Started as an MPE/iX Programmer Programmer's Guide: HP 3000 Computer MPE/iX Computer Systems > Chapter 1 OVERVIEW

Giving Commands to MPE/iX

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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

Figure 1-4 Commanding MPE/iX

[Commanding MPE/iX]

MPE/iX Commands

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.

        :HELLO
   :BYE

        :BUILD
   :FILE
   :LINK
   :RUN

        :COPY
   :RENAME
   :LISTF
   :PURGE

        :SHOWJOB
   :SHOWME

        :HELP
   :REDO

        :TELL
   :TELLOP
   :SETMSG

        :CCXL
   :COB85XL
   :PASXL
   :FTNXL

        :RESUME
   :ABORT

   BREAK key

For detailed information, refer to the MPE/iX Commands Reference Manual Volumes 1 and 2 (32650-90003 and 32650-90364).

MPE/iX Command Parameters

Some commands require or can accept parameters. Parameters given in command syntax can have two components:

  • Literal information that you must enter exactly as shown in documentation. For example, in the command

          :SHOWJOB JOB=@J
    
    • JOB= is literal information.

  • User-supplied variable information that is specific for the current invocation of the command. For example, in the command above, @J is a user-supplied variable.

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:

  • Location of a parameter in the list is significant.

  • Each parameter is separated by a comma (,).

  • If a parameter is omitted from the list, a place-holding comma must replace it, unless the parameter is at the end of the list.

For example:

        :COBOLII SOURCE,,LISTOUT

The characteristics of a keyword parameter list are:

  • Location of a parameter in the list is not significant.

  • Each parameter is preceded by a semicolon (;).

  • It can have a positional subparameter list.

For example,

        :FILE OUTFILE;DEV=LP;CCTL

is the same as

        :FILE OUTFILE;CCTL;DEV=LP

Continuing an MPE/iX Command to Another Line

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:

        :BUILD MYFILE;DEV=DISC &
        :REC=-80

On-line Help in Using an MPE/iX Command

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.

Correcting or Modifying an MPE/iX Command

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.

Referring to Several Files at Once

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:

@

All strings up to eight characters long, including a null string.

?

A single alphanumeric character.

#

A single numeric character.

Examples of wildcard use are:

@A@

All filenames (in the logon account and group) that include an A. For example, it could include the filenames:


   AARDVARK
   DELTA
   BACCUS
@.@.PRR

All filenames in all groups of the PROG account. For example, it could include the filenames:


   CONTENTS.PUB.PROG
   CONTENTS.MKT.PROG
   CONTENTS.ENG.PROG
ABC?

All filenames (in the logon account and group) starting with ABC and ending with any single alphanumeric character. For example, it could include the filenames:


   ABCX
   ABCY
   ABCZ
XYZ#@

All filenames (in the logon account and group) starting with XYZ, followed by a single numeric character, and possibly ending in other characters. For example, it could include the filenames:


   XYZ1
   XYZ23
   XYZ2AAA

Command Files and User-defined Command Files

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:

  • Head: name of the UDC (required) and parameters and defaults (optional).

  • Options (this portion is optional):

    LIST, which lists all commands executable when the UDC is invoked.

    LOGON, which immediately executes the UDC at log on.

    NOBREAK, which disables the BREAK key for UDC execution.

    NOHELP, which disables :HELP for UDC execution (normally :HELP lists the entire UDC file).

  • Body: one or more MPE/iX commands contained in this UDC.

  • Separator: one or more asterisks (*) alone on a line, separating command definitions.

Figure 1-5 “UDC File Example” shows an example of a UDC file containing two UDCs.

Figure 1-5 UDC File Example

[UDC File Example]

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:

  • Parameters can have any name that starts with an alphabetic character and has no special characters, such as $ or %.

  • A parameter without a default value is required to execute the UDC.

  • An exclamation point (!) indicates that the following string is a parameter. If no exclamation point appears, MPE/iX processes the string as part of the command.

  • If the default value specified for a parameter contains a special character other than $ or #, the default must be delimited by double quotation marks (").

  • If a UDC calls another UDC, the called UDC must be defined in the UDC catalog (see below)after the calling UDC unless recursion is specifically enabled.

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:

  • User level (Us)

  • Account level (Ac)

  • System level (Sy)

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