Guardian Procedure Calls Reference Manual
WRITEUPDATEUNLOCK[X] Procedures
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
OSS Considerations
Considerations for WRITEUPDATEUNLOCKX Only
Errors for WRITEUPDATEUNLOCKX Only
Example
Related Programming Manuals
Summary
The WRITEUPDATEUNLOCK[X] procedures perform random processing of records in a disk file.
The WRITEUPDATEUNLOCK procedure is intended for use with 16-bit addresses, while the
WRITEUPDATEUNLOCKX procedure is intended for use with 32-bit addresses. The data buffer for
WRITEUPDATELOCKX can be either in the caller's stack segment or any extended data segment.
WRITEUPDATEUNLOCK[X] has two functions:
• To alter, then unlock, the contents of the record at the current position
• To delete the record at the current position in a key-sequenced or relative file
A call to WRITEUPDATEUNLOCK[X] is equivalent to a call to WRITEUPDATE[X] followed by a call
to UNLOCKREC. However, the WRITEUPDATEUNLOCK[X] procedure requires less system processing
than do the separate calls to WRITEUPDATE[X] and UNLOCKREC.
NOTE: The WRITEUPDATEUNLOCK[X] procedures perform the same operation as the
FILE_WRITEUPDATEUNLOCK64_ Procedure (page 543), which is recommended for new code.
Key differences in FILE_WRITEUPDATEUNLOCK64_ are:
• The pointer and tag parameters are 64 bits wide.
• The write-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(WRITEUPDATEUNLOCK)>
_cc_status WRITEUPDATEUNLOCK ( short filenum
,short _near *buffer
,unsigned short write-count
,[ unsigned short _near *count-written ]
,[ __int32_t tag ] );
1516 Guardian Procedure Calls (W-Z)