Lesson 2: Nested Levels of the Command Interpreter [ MPE V to MPE XL: Getting Started ] MPE/iX 5.0 Documentation
MPE V to MPE XL: Getting Started
Lesson 2: Nested Levels of the Command Interpreter
The program CI.PUB.SYS does not have process handling (PH) capability,
the ability to access nested levels. Therefore, the ability to run
CI.PUB.SYS from levels other than the root level of the command
interpreter is dependent upon either the user or the application program
having PH capability.
Users with PH capability can run CI.PUB.SYS or any other program from all
levels of the CI, root or nested. PH capability enables users to access
nested levels of the CI.
NOTE Users with PH capability can run any program, including CI.PUB.SYS,
from the root or nested levels.
A good example of the convenience of this feature is the ability to
access another level of the CI while in the middle of developing a
program. When programming, you can save the code you have just written.
Then, without having to exit your editor environment, you can run
CI.PUB.SYS; from this next-level CI you can compile and test your
program. Finally, you can EXIT that CI level, return to the earlier
level, and continue working on the program code without having to
redefine your environment.
Example:
___________________________________________________________________
| |
| |
| :editor |
| ... |
| /a |
| 1 (User writes program.) |
| ... |
| /k prog |
| ... |
| /:run ci.pub.sys |
| ... |
| : (Nested CI level; user compiles/runs PROG) |
| ... |
| :exit |
| / (User edits program.) |
| |
___________________________________________________________________
With the exception of SETCATALOG and CHGROUP, which can only be executed
from the root level, MPE commands are functional in nested levels.
A new command line history stack is created for each new nested level.
As you EXIT a level, the history stack for that level is permanently
erased, and the history stack for the previous level is restored.
All user created variables and most user defined system variables remain
constant across all nested levels. Exceptions include HPREDOSIZE,
HPCONTINUE, HPUSERCMDEPTH, HPAUTOCONT, HPCMDTRACE, and HPMSGFENCE.
NOTE User PH capability is needed to complete the following exercises.
Exercises
You might want to change the prompt to reflect the HPCIDEPTH level before
doing the following exercises.
5a. Get to nested level 4.
5b. Try to reset your UDC catalog. Explain what happened.
6a. Assign a value to the variable A; display it.
6b. Display your history stack to the screen; then exit level 4 of the
CI.
6c. Display the value of the variable A. Explain what happened.
7a. Display your history stack to the screen; notice what commands are
listed.
7b. Get to nested level 4 again.
7c. Display your history stack to the screen; what command is listed?
Explain what happened to the commands that you displayed in
exercises 7a and 7c.
8. Back out of the nested levels of the CI to the root level.
9. Use an editor to write a short program; save it. From within the
editor, run CI.PUB.SYS. Compile and run your program; then EXIT back
to the editor at the root level.
MPE/iX 5.0 Documentation