Guardian Programming Reference Summary for C
Functions Summary (R-Z)
Guardian Programming Reference Summary for C—522630-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.
return value:
_status_lt (<returned_value>) An error occurred (call FILEINFO).
_status_lt (<returned_value>) 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.
_status_eq (<returned_value>) The READ[X] is successful.
_status_gt (<returned_value>) 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).
#include <cextdecs(READ_FILE )>
short READ_FILE ( short _near *file-fcb /* i */
  ,short _near *buffer /* o */
  ,[ short _near *count-returned ] /* o */
  ,[ short prompt-count ] /* i */
 ,[ short max-read-count ] /* i */
 ,[ short nowait ] ); /* i */
0=No 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.










