To Create a Menu of Options [ Command Interpreter Access and Variables Programmer's Guide ] MPE/iX 5.0 Documentation
Command Interpreter Access and Variables Programmer's Guide
To Create a Menu of Options
The MENU command file provides a mechanism for running two programs,
DBREVIEW and DBUPDATE. The user's response of 1 or 2 performs the proper
program and prompts the user for another selection. A response of 0 to
exit the routine ends the WHILE loop and ends the command file execution.
______________________________________________________
| |
| SETVAR CHOICE "" |
| WHILE CHOICE <> "0" DO |
| ECHO Enter 0 to exit |
| ECHO 1 to review database |
| ECHO 2 to update database |
| INPUT CHOICE,"Which number do you select?",15|
| IF CHOICE = "1" THEN |
| DBREVIEW |
| ELSEIF CHOICE = "2" THEN |
| DBUPDATE |
| ENDIF |
| ENDWHILE |
______________________________________________________
Figure 7-10. Menu Command File
MPE/iX 5.0 Documentation