Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (L)
Guardian Procedure Calls Reference Manual—522629-013
8-21
LOCKREC Procedure
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 LOCKREC, which indicates the condition code, can
be interpreted by
_status_lt(), _status_eq(), or _status_gt() (defined
in the file
tal.h).
Syntax for TAL Programmers
Parameters
filenum input
INT:value
is the number of an open file that identifies the file containing the record to be
locked.
tag input
INT(32):value
is for nowait I/O only.
tag is a value you define that uniquely identifies the
operation associated with this LOCKREC.
Condition Code Settings
< (CCL) indicates that an error occurred (call FILE_GETINFO_ or FILEINFO).
= (CCE) indicates that the LOCKREC was successful.
> (CCG) indicates that the file is not a disk file.
Considerations
•
Nowait and LOCKREC
#include <cextdecs(LOCKREC)>
_cc_status LOCKREC ( short filenum
,[ __int32_t tag ] );
CALL LOCKREC ( filenum ! i
,[ tag ] ); ! i
Note. The system stores the tag value until the I/O operation completes. The system then
returns the tag information to the program in the tag parameter of the call to AWAITIO[X], thus
indicating that the operation completed.