TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-322
#REQUESTER Built-In Function
#REQUESTER Built-In Function
Use #REQUESTER to open and close processes, devices, and structured and
unstructured files and to read and write those files.
option
specifies one of these:
EXCLUSION { SHARED | PROTECTED | EXCLUSIVE }
specifies the type of file sharing to be used with the READ or WRITE creation
parameter.
EXCLUSIVE
specifies that others cannot open file-name.
PROTECTED
specifies that others can open file-name for reading, but not for writing.
SHARED
specifies that others can open file-name for reading or writing. This option is
ignored if used with the CLOSE parameter. If omitted, the default parameter for
READ is SHARED, and for WRITE is PROTECTED for disk files.
WAIT [ num ]
specifies that the requester is to do waited I/O rather than no-wait I/O (the
default). With waited I/O, TACL waits automatically as needed: TACL executes
subsequent functions after initiating an I/O request, but if it encounters an
#APPEND, #APPENDV, #EXTRACT, or #EXTRACTV function that refers to a
requester variable, it stops until the pending I/O operation is finished.
If you do not specify the WAIT option, TACL continues execution immediately
after placing an I/O request. After allowing execution of independent functions,
use the #WAIT function on the requester variable to ensure that the I/O
operation is complete before you access the variable again.
A requester normally uses a buffer length of 239 characters, but you can
exceed that limit by specifying num as a value in the range 132 to 5000. If you
omit num, the requester does waited I/O, but the 239-character default buffer
size remains in effect.
#REQUESTER [ / option [ , option ] / ]
{
{ CLOSE variable-level } |
{ READ file-name error-var read-var prompt-var } |
{ WRITE file-name error-var write-var }
}