Guardian Procedure Calls Reference Manual
READUPDATELOCK[X] Procedures
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
Considerations for READUPDATELOCKX Only
OSS Considerations
Errors for READUPDATELOCKX Only
Example
Related Programming Manuals
Summary
The READUPDATELOCK[X] procedures are used for random processing of records in a disk file.
The READUPDATELOCK procedure is intended for use with 16-bit addresses, while the
READUPDATELOCKX procedure is intended for use with 32-bit extended addresses. The data buffer
for READUPDATELOCKX can be either in the caller's stack segment or any extended data segment.
READUPDATELOCK[X] locks, then reads the record from the current position in the file in the same
manner as the combination of LOCKREC and READUPDATE[X]. READUPDATELOCK[X] is intended
for reading a record after calling POSITION or KEYPOSITION, possibly in anticipation of a
subsequent call to the WRITEUPDATE[X] or WRITEUPDATEUNLOCK[X] procedure.
A call to READUPDATELOCK[X] is functionally equivalent to a call to LOCKREC followed by a call
to READUPDATE[X]. However, less system processing is incurred when one call is made to
READUPDATELOCK[X] rather than two separate calls to LOCKREC and READUPDATE[X].
NOTE: The READUPDATELOCK[X] procedures perform the same operation as the
FILE_READUPDATELOCK64_ Procedure (page 492), which is recommended for new code.
Key differences in FILE_READUPDATELOCK64_ are:
• The pointer and tag parameters are 64 bits wide.
• The read-count parameter is 32 bits wide.
• The procedure returns an error code value rather than a condition code, simplifying
error-handling code.
Syntax for C Programmers
#include <cextdecs(READUPDATELOCK)>
_cc_status READUPDATELOCK ( short filenum
,short _near *buffer
,unsigned short read-count
,[ unsigned short _near *count-read ]
,[ __int32_t tag ] );
READUPDATELOCK[X] Procedures 1221