Section 4 Accessing Files; Requester Operation - HP TACL Programming Manual

Tandem advanced command language
Table of Contents

Advertisement

4 Accessing Files
The #REQUESTER built-in function allows you to open a file, process, or device so
that you can send messages or records to it or read messages or records from it.
This section describes how to use #REQUESTER to access files. For information about
the use of #REQUESTER with processes, see "Using $RECEIVE" in Section 5,
"Initiating and Communicating With Processes."
#REQUESTER
To open a file, call the #REQUESTER function and include the file name and a set of
Operation
variables that are used to transmit data. If you plan to set up more than one
#REQUESTER operation, you can identify variables by including file identification
information in each variable name. To list a variable and its association with the
#REQUESTER operation, use the VARINFO command.
The call to #REQUESTER does not perform input or output; it opens the specified file
and initializes the associated variables. If a file system error occurs during this step,
#REQUESTER returns the error.
The #REQUESTER function opens a file for waited or nowaited I/O. After you invoke
the #REQUESTER function, TACL continues to execute code. For waited I/O
operations, TACL stops at the next I/O request and ensures that each read or write is
complete before processing the next request. For nowaited operations, call #WAIT to
determine whether your request has been completed. If you plan to read or write
records larger than 239 bytes, you must use waited I/O.
To initiate a read or write operation, you append data to the appropriate variable, as
described in the following subsections. When your TACL process first detects data in
the variable, TACL initiates the operation and transfers a record of data.
To read and write from the same file, call #REQUESTER twice to establish two
communication paths to the file. Use a separate set of variables for each
communication path.
When you use #REQUESTER, your TACL process does not create a separate process,
but manages the I/O from within your TACL process. The #REQUESTER function
uses sequential I/O to access files, devices, and processes.
Note
The way in which you order the variables in the #REQUESTER call is very important; the file name must
be first, followed by the error variable and the read or write variable. For a read operation, the prompt
variable must be specified last.
To close a file, call #REQUESTER with the CLOSE option.
4–1
107365 Tandem Computers Incorporated

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents