Guardian Procedure Calls Reference Manual
FILE_LOCKFILE64_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Returned Value
Considerations
OSS Considerations
Related Programming Manual
Summary
The FILE_LOCKFILE64_ procedure is used to exclude other users from accessing a file (and any
records within that file). The "user" is defined either as the opener of the file (identified by the
filenum) if the file is not audited—or the transaction (identified by the TRANSID) if the file is
audited.
FILE_LOCKFILE64_ extends the capabilities of LOCKFILE in the following ways:
• It is callable from both 32-bit and 64-bit processes.
• It allows a 64-bit nowait I/O tag to be passed.
• Rather than returning a condition code status, the procedure returns a file management error.
A return value of zero indicates success.
If the file is currently unlocked or is locked by the current user when FILE_LOCKFILE64_ is called,
the file (and all its records) becomes locked, and the caller continues executing.
If the file is already locked by another user, behavior of the system is specified by the locking
mode. There are two "locking" modes available:
• Default—Process requesting the lock is suspended (see Considerations).
• Alternate—Lock request is rejected with file-system error 73. When the alternate locking mode
is in effect, the process requesting the lock is not suspended (see Considerations).
NOTE: The FILE_LOCKFILE64_ procedure is supported on systems running H06.24 and later
H-series RVUs and J06.13 and later J-series RVUs. Its use is recommended for new code.
Syntax for C Programmers
#include <cextdecs(FILE_LOCKFILE64_)>
short FILE_LOCKFILE64_ ( short filenum
,[ long long tag ] );
Syntax for TAL Programmers
?SETTOG _64BIT_CALLS
?SOURCE EXTDECS(FILE_LOCKFILE64_)
error := FILE_LOCKFILE64_ ( filenum ! i
,[ tag ] ); ! i
450 Guardian Procedure Calls (F)