Guardian Programming Reference Summary for pTAL and TAL
Procedure Calls Summary (R-Z)
Guardian Programming Reference Summary for pTAL and TAL—522631-001
8-2
READ^FILE 
Reads a file sequentially. READ^FILE is a sequential I/O (SIO) procedure and can be 
used only with files that have been opened by OPEN^FILE.
< (CCL) An error occurred (call FILEINFO).
< (CCL) Also returned following a successful read with an insertion-ordered alternate key 
path if the alternate key value of the current record is equal to the alternate key 
value in the following record along that path. A call to FILE_GETINFO_ or 
FILEINFO shows that error 551 occurred; this error is advisory only and does 
not indicate an unsuccessful read operation.
= (CCE) The READ[X] is successful.
> (CCG) For disk and nondisk devices, the end of file (EOF) is encountered (no more 
records in this subset); for the $RECEIVE file, a system message is received 
(call FILEINFO).
error := READ^FILE ( file-fcb
 ,buffer
 ,[ count-returned ]
 ,[ prompt-count ]
 ,[ max-read-count ]
 ,[ nowait ] );
error, INT returned value
0No error.
1 End of file.
6 System message (only if user requested system messages through 
SET^SYSTEMMESSAGES or SET^SYSTEMMESSAGESMANY).
111 Operation aborted because of BREAK (if BREAK is enabled). If nowait is not zero, 
and if abort-on-error is in effect, the only possible value for error is 0.
file-fcb, INT:ref:* input
buffer, INT:ref:* output
count-returned, INT:ref:1 output
prompt-count, INT:value input
max-read-count, INT:value input
nowait, INT:value input










