Lesson 7: PROGRAM Option [ MPE V to MPE XL: Getting Started ] MPE/iX 5.0 Documentation
MPE V to MPE XL: Getting Started
Lesson 7: PROGRAM Option
The new MPE XL option PROGRAM/NOPROGRAM allows you to specify when a user
command may or may not be executed from within a program. OPTION PROGRAM
is the default.
NOTE Programs and subsystems (such as EDIT/3000) that use the new MPE XL
intrinsic HPCICOMMAND can execute UDCs that have OPTION PROGRAM
specified. Programs and subsystems that use the old MPE V/E
COMMAND intrinsic, however, cannot execute UDCs even when OPTION
PROGRAM has been specified.
The new PROGRAM option (the default condition) will allow you to execute
the following UDC from within an application program.
TIME
SHOWTIME
**
Example:
VOLUTIL is MPE XL's replacement for the MPE V/E command VINIT. It has a
prompt of its own ("volutil:"). Upon entering a colon (:) followed by
the UDC TIME (at the VOLUTIL prompt), the UDC will execute.
volutil: :TIME
MON, MAR 9 1987, 11:07 AM
If OPTION NOPROGRAM is specified:
TIME
OPTION NOPROGRAM
SHOWTIME
**
OPTION NOPROGRAM will suppress the user command search when the user
command is executed from within a program. In this case entering the UDC
TIME from within VOLUTIL results in an error message.
volutil: :TIME
UNKNOWN COMMAND NAME. (CIERROR 975)
Exercises
16. Study the following UDC and indicate how you would change this file
so that the UDC LF would not be executable from within a program.
LF
LISTF
***
17. Assume that you have a command file called LPRINT. Could you execute
LPRINT from within a program, if the program used the HPCICOMMAND
intrinsic? If it used the COMMAND intrinsic?
MPE/iX 5.0 Documentation