CMDINP

This turns on and off command file input within XCALL INPUT or XCALL INFLD. The default is off, in which case these input routines do not accept input from a command file. INFLD supports a TYPE code "p" which turns on command file input, and you can force this on by adding SBR=INFDEF:p to miame.ini file. But these methods either require a change to your program or that you exit from A-Shell and modify miame.ini. The SET {NO}CMDINP command, on the other hand, can be used within A-Shell, or even within a command file. For example, you might have a command file which contains:

:R

SET CMDINP

RUN MENU

15

<program inputs>

SET NOCMDINP

RUN MENU

HOST

 

The above command file starts by setting command input on, and then runs a menu program, and forces it to select option 15. It then continues to include the necessary prompts for the program corresponding to menu option 15, after which that program finishes and returns to the command file. Then it turns command file input back off again and starts up the main menu, which now waits for real keyboard input. Finally, when the user exits out of that menu, the command file picks up and forces A-Shell to exit.