Cominput. DORIC 9.65, INFO-Text software
Oglas
Oglas
COMINPUT
CO
MINPUT path_name
CONT
INUE
PAUSE
TTY
used to direct, redirect and otherwise control the flow of INFO command input.
arguments notes
path_name must refer to an ASCII text file in the INFO directory of your current workspace. path_name can include global variables.
CONTINUE resumes reading command input from a previously suspended COMINPUT file (see the description of the PAUSE option just below). The command stream resumes with the command following the COMINPUT
PAUSE command in the suspended COMINPUT file.
PAUSE suspends processing of the COMINPUT file and redirects the command input to come from your terminal.
A subsequent COMINPUT CONTINUE command resumes reading the command input from the suspended
COMINPUT file.
TTY closes the COMINPUT file and redirects command input to come from your terminal. A COMINPUT TTY command can occur anywhere in a COMINPUT file; however, you can only issue the COMINPUT TTY command from your terminal after the file has ended and the host system has passed control back to the terminal.
n
The COMINPUT command may function differently on different computer systems. For this reason, be careful when using it in applications that might be moved to different types of hardware.
n
The file the commands are taken from must exist in your current operating system directory.
INFO Reference Manual Commands 93
COMINPUT discussion
n
If the CO command is used in a program, it is not executed until the program has finished, regardless of where it is in the program.
n
INFO also accepts a dash (-) in front of CONTINUE,
PAUSE and TTY.
The COMINPUT command, when used interactively, directs INFO to begin accepting commands from a file
(called a COMINPUT file) instead of from your terminal.
You specify an existing ASCII text file in the COMINPUT command line, and INFO begins to read INFO commands from that file. This COMINPUT file should contain a series of INFO commands, one command per line in the file. INFO reads commands from this file until it reaches the end of the file or a COMINPUT TTY command.
You can include COMINPUT commands within a
COMINPUT file to redirect command input to come from the terminal temporarily (with the PAUSE option) or permanently (with the TTY option).
examples
On the following page is a listing of an ASCII text file called example.cmi, which contains INFO commands, and an example of how this file can be executed from within INFO using the COMI command.
94 Commands INFO Reference Manual
COMINPUT example.cmi
SELECT DF.SALES
DISPLAY SALES.REP
RUN PG.STATUS.REP Y 60
COMI TTY
ENTER COMMAND >COMI EXAMPLE.CMI
ENTER COMMAND >SELECT DF.SALES
25 RECORD(S) SELECTED
ENTER COMMAND >DISPLAY SALES-REP
HARVEY
JACK
JILL
TODD
ROD
COMI file execution begins here
ENTER COMMAND >RUN PG.STATUS.REP Y 60
ENTER COMMAND >COMI TTY
ENTER COMMAND >
Last command in the COMI file.
You can now enter an INFO command at your terminal.
INFO Reference Manual Commands 95
Prenesi
Oglas