TACL Reference Manual
Built-In Functions and Variables
HP NonStop TACL Reference Manual—429513-018
9-325
#REQUESTER Built-In Function
This action triggers a read operation. If you are reading from a file, TACL ignores
the contents of prompt-var. If you are reading from a process or device, TACL
sends the contents of prompt-var to the process or device as part of a
WRITEREAD operation.
•
If you specify a WRITE requester for a nonexistent disk file, TACL creates an edit-
format file; if you specify a READ requester for a nonexistent file, a file-system
error occurs.
•
If #REQUESTER is unsuccessful in creating a requester, such as in the case
above, it returns the file-system error in its result. If it is successful, any future
errors (such as end-of-file in a read requester) are returned in error-var.
•
All I/O for no-wait requesters takes place while normal TACL processing continues.
I/O automatically occurs when information becomes available in the variables and
files specified. To synchronize I/O, use the #WAIT built-in function.
•
A requester, waited or no-wait, that does I/O on a disk file requires that TACL
internally allocate one of its block buffers. Because these block buffers are large
and must be allocated from the first 64K bytes of the TACL address space, there
are only four of them. Each block buffer is 1024 bytes. The #IN and #OUT built-in
functions also require these buffers. A block buffer is passed to the SIO procedure
to help perform read and write operations to the file. SIO uses the block buffers
whenever necessary.
•
For structured files, block buffers can be used to improve the efficiency of read
operations. For edit-format files, block buffers are required by SIO to perform write
padding of records. For other types of files, block buffers can be used for record
blocking and unblocking.
•
If you specify a waited requester with a record length greater than 1024 bytes,
TACL allocates one of its block buffers. SIO automatically turns off block buffering
because the record length is greater than the block buffer length.
•
The only way you can use large buffers is by using waited requesters; a waited
requester still counts against the block buffer limit.
•
The maximum record lengths are as follows:
•
For non-edit disk files, trailing blanks at the end of a STRUCT (for example,
FILLER bytes or trailing blanks in the last STRUCT data item) are not trimmed
from the output record before being written to the file using the #APPENDV built- in
function. For edit-format files, SIO automatically trims trailing blanks from the
output record before it is written to the file.
Edit-format files 239 bytes
No-waited requesters 239 bytes
Unstructured non-edit files 1024 bytes
Other waited requesters 5000 bytes