Guardian Procedure Calls Reference Manual
READ[X] Procedures
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
Disk File Considerations
Errors for READ[X]
Errors for READX Only
Example
Related Programming Manuals
Summary
The READ[X] procedures return data from an open file to the application process' data area. The
READ procedure is intended for use with 16-bit addresses, while the READX procedure is intended
for use with 32-bit extended addresses. The data buffer for READX can be either in the caller's
stack segment or any extended data segment.
The READ[X] procedures sequentially read a disk file. For key-sequenced, relative, and
entry-sequenced files, the READ[X] procedures read a subset of records in the file. (A subset of
records is defined by an access path, positioning mode, and comparison length.)
NOTE: The READ[X] procedures perform the same operation as the FILE_READ64_ Procedure
(page 475), which is recommended for new code.
Key differences in FILE_READ64_ are:
• The pointer and tag parameters are 64 bits wide.
• The read-count parameter is 32 bits wide.
• The procedure returns an error code value rather than a condition code, simplifying
error-handling code.
Syntax for C Programmers
#include <cexteds(READ)>
_cc_status READ ( short filenum
,short _near *buffer
,unsigned short read-count
,[unsigned short _near *count-read ]
,[ __int32_t tag ] );
#include <cexteds(READX)>
_cc_status READX ( short filenum
,char _far *buffer
,unsigned short read-count
,[unsigned short _far *count-read ]
,[ __int32_t tag ] );
1192 Guardian Procedure Calls (R)