Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (R)
Guardian Procedure Calls Reference Manual522629-013
13-3
READ[X] Procedures
READ[X] Procedures
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
Disk File Considerations
Errors for READX Only
Example
Related Programming Manuals
Summary
The READ[X] procedures return data from an open file to the application process’s
data area. READ is intended for use with 16-bit addresses, while READX is intended
for use with 32-bit extended addresses. Therefore, 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.)
Syntax for C Programmers
CEXTDECS (via the included file TNSINTH) defines 32-bit values as the typedef
__int32_t which for TNS and TNS/R compiles is defined as
long and for TNS/E
compiles is defined as
int.
#include <cextdecs(READ)>
_cc_status READ ( short filenum
,short _near *buffer
,unsigned short read-count
,[ short _near *count-read ]
,[ __int32_t tag ] );
#include <cextdecs(READX)>
_cc_status READX ( short filenum
,char *buffer
,short read-count
,[ short *count-read ]
,[ __int32_t tag ] );