Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (R)
Guardian Procedure Calls Reference Manual—522629-013
13-21
READLOCK[X] Procedures
READLOCK[X] Procedures
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
Errors for READLOCKX Only
Considerations for READLOCKX Only
OSS Considerations
Related Programming Manuals
Summary
The READLOCK and READLOCKX procedures sequentially lock and read records in a
disk file, exactly like the combination of LOCKREC and READ[X]. READLOCK is
intended for use with 16-bit addresses, while READLOCKX is intended for use with 32-
bit extended addresses. Therefore, the data buffer for READLOCKX can be either in
the caller’s stack segment or any extended data segment.
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.
•
The function value returned by READLOCK[X], which indicates the condition code,
can be interpreted by
_status_lt(), _status_eq(), or _status_gt()
(defined in the file
tal.h).
#include <cextdecs(READLOCK)>
_cc_status READLOCK ( short filenum
,short _near *buffer
,short read-count
,[ short _near *count-read ]
,[ __int32_t tag ] );
#include <cextdecs(READLOCKX)>
_cc_status READLOCKX ( short filenum
,char *buffer
,short read-count
,[ short *count-read ]
,[ __int32_t tag ] );