Guardian Procedure Calls Reference Manual
count-returned
output
INT:ref:1
returns the number of bytes returned to buffer. If I/O is nowait, this parameter has no
meaning and can be omitted. The count is then obtained in the call to WAIT^FILE.
prompt-count
input
INT:value
is a count of the number of bytes in buffer, starting with element zero, to be used as an
interactive prompt for terminals or interprocess files. If omitted, the interactive prompt character
defined in OPEN^FILE is used.
max-read-count
input
INT:value
specifies the maximum number of bytes to be returned to buffer. If omitted or if it exceeds
the file's logical record length, the logical record length is used for this file.
nowait
input
INT:value
indicates whether or not to wait for the I/O operation to complete in this call. If omitted or
zero, then "wait" is indicated. If not zero, the I/O operation must be completed in a call to
WAIT^FILE.
Returned Value
INT
A file-system or SIO procedure error code that indicates the outcome of the call.
If abort-on-error mode is in effect, the only possible values are:
No error.0
End of file.1
System message (only if user requested system messages through SET^SYSTEMMESSAGES or
SET^SYSTEMMESSAGESMANY).
6
Operation aborted because of BREAK (if BREAK is enabled).111
If nowait is not zero, and if abort-on-error is in effect, the only possible value is 0.
Considerations
• Terminal or Process File
If the file is a terminal or process, a WRITEREAD operation is performed using the interactive
prompt character or prompt-count character from buffer. For $RECEIVE, READ^FILE
does a READUPDATE instead of a READ.
Example
ERROR := READ^FILE ( IN^FILE , BUFFER , COUNT );
READ^FILE Procedure 1201