Using the INLINE Facility
Initiating and Communicating With Processes
5–6
107365 Tandem Computers Incorporated
Using the INLINE Facility
The INLINE facility allows you to incorporate command stream processing into your
TACL program. The syntax closely resembles interactive syntax. The INLINE facility
provides the flexibility of an interactive interface; you can read process output,
examine it, and make decisions about further commands.
The INLINE facility allows you to switch output variables during the operation of
your TACL program. This ability can be especially useful if you are gathering
information and then sending commands—such as in a PERUSE session where you
obtain a list of jobs and then delete the jobs. You can work from the first set of output
and use a second output variable for results and errors.
The INLINE facility supports only one active communication path at a time. You can
push and define new INLINE processes while maintaining existing INLINE processes,
but you can only access the most recently defined process. To communicate with more
than one process at the same time, use the INV and OUTV options or #SERVER.
To use the INLINE facility, you define a prefix for commands that you send to the new
process. You start the process with a RUN or #NEWPROCESS command and specify
the INLINE option. Your commands appear as they would in an interactive session,
except that they start with the defined prefix and a space character.
You can capture the output into a queue, examine the contents of the queue, and
enable and disable output to the queue.
TACL IN and OUT files coexist with INLINE input and output streams; when you
start a process with the INLINE option, TACL does not use its own IN and OUT files
as the default files for the process; instead, it uses the file $name.#Sn, where $name is
the name of the TACL process and n is the ASCII representation of a decimal number
chosen by TACL. Process I/O is therefore directed to TACL itself, which can then
handle the I/O as determined by your TACL code.
Note
Your TACL process must be started with a process name if you want to use the INLINE option—the
operating system does not allow an unnamed process to be opened using a qualifying name, and TACL
uses a qualifying name (of its own choosing) to recognize OPEN operations from processes using the
INLINE option.
Table 5-2 lists the minimum set of commands or variables you use to run a process and
communicate with it through the INLINE facility.
Table 5-2. INLINE Commands and Variables
Command or Function
Description
RUN or #NEWPROCESS with the INLINE option
Starts a process
#INLINEPREFIX or INLPREFIX
Sets the prefix for commands to the process
TACL command or function, preceded by the prefix
and a space
Sends a request to the process
#INLINEEOF or INLEOF
Closes the process