Guardian Procedure Calls Reference Manual
UNLOCKREC Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
OSS Considerations
Example
Related Programming Manual
Summary
The UNLOCKREC procedure unlocks a record currently locked by the user. The "user" is defined
either as the opener of the file (identified by filenum) if the file is not audited—or the transaction
(identified by the TRANSID) if the file is audited. UNLOCKREC unlocks the record at the current
position, allowing other users to access that record. UNLOCKREC has no effect on a record of an
audited file if that record has been modified by the current transaction.
NOTE: The UNLOCKREC procedure performs the same operation as the FILE_UNLOCKREC64_
Procedure (page 521), which is recommended for new code.
Key differences in FILE_UNLOCKREC64_ are:
• The tag parameter is 64 bits wide.
• The procedure returns an error code value rather than a condition code, simplifying
error-handling code.
Syntax for C Programmers
#include <cextdecs(UNLOCKREC)>
_cc_status UNLOCKREC ( short filenum
,[ __int32_t tag ] );
• CEXTDECS (through 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 UNLOCKREC, 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
CALL UNLOCKREC ( filenum ! i
,[ tag ] ); ! i
1436 Guardian Procedure Calls (T-V)