HP 3000 Manuals

Lesson 8: OPTION as a Command [ MPE V to MPE XL: Getting Started ] MPE/iX 5.0 Documentation


MPE V to MPE XL: Getting Started

Lesson 8:  OPTION as a Command 

OPTION is an MPE XL command and can be used in any user command--both
UDCs and command files.

The new OPTION command allows RECURSION/ NORECURSION and LIST/NOLIST to
be specified anywhere in the body of a user command.  All other options
can only be set in the option header(s).  Options remain in effect
until the user command has finished executing or, in the case of
RECURSION/NORECURSION and LIST/NOLIST, until they are overridden by the
OPTION command in the body of the user command.

In the following example, the header OPTION LIST is activated in the UDC
DOIT1 and deactivated later in the UDC body with the OPTION command.
Also note where OPTION RECURSION appears in UDC DOIT3.

For example:
___________________________________________________________________
|                                                                 |
|                                                                 |
|           DOIT1                                                 |
|           OPTION LIST                                           |
|           showtime                                              |
|           OPTION NOLIST                                         |
|           listf                                                 |
|           **                                                    |
|           DOIT2                                                 |
|           showme                                                |
|           **                                                    |
|           DOIT3                                                 |
|           option nobreak                                        |
|           option nohelp                                         |
|           listf                                                 |
|           OPTION RECURSION                                      |
|           doit2                                                 |
|           **                                                    |
|                                                                 |
___________________________________________________________________

Exercises 

18.  Create a single UDC that does the following in the order given:

     a.   Executes the SHOWTIME command without listing the SHOWTIME
          command to the screen.

     b.   Executes the LISTF command without listing the LISTF command to
          the screen.

     c.   Lists to the screen and executes the SHOWME command.

19.  What is wrong with the following command file?

          OPTION NOLIST
          FILE OUT;DEV=LP
          PRINT MYFILE, OUT=*OUT
          OPTION LIST, NOHELP
          LISTF MYFILE,2



MPE/iX 5.0 Documentation