Open System Services System Calls Reference Manual (G06.28+)

SPT_UNLOCKREC(2) OSS System Calls Reference Manual
Calling SPT_UNLOCKREC() after KEYPOSITION
If the call to SPT_UNLOCKREC() immediately follows a call
to KEYPOSITION where a nonunique alternate key is specied,
the SPT_UNLOCKREC() call fails. A subsequent call to
FILE_GETINFO_ or FILEINFO shows that Guardian le-
system error 46 (invalid key) occurred. However, if an inter-
mediate call to SPT_READX( ) or SPT_READLOCKX() is
performed, the call to SPT_UNLOCKREC() is permitted.
Unlocking several records
If several records need to be unlocked, the
SPT_UNLOCKREC( ) function can be called to unlock all
records currently locked by the user (rather than unlocking the
records through individual calls to SPT_UNLOCKREC( )).
Current-state indicators after SPT_UNLOCKREC()
For key-sequenced, relative, and entry-sequenced
les, the
current-state indicators after an UNLOCKREC remain
unchanged.
File pointers after SPT_UNLOCKREC()
For unstructured les, the current-record pointer and the next-
record pointer remain unchanged.
Transaction Management Facility (TMF) and SPT_UNLOCKREC()
A record that is locked in a le audited by TMF and has been
modied by the current transaction is unlocked when an
SPT_ABORTTRANSACTION() or
SPT_ENDTRANSACTION() function is called for that le.
Locks on modied records of audited les are released only
when the transaction is ended or aborted by TMF. An
unmodied audited record is unlocked by
SPT_UNLOCKREC( ).
Use on OSS Objects
This procedure operates only on Guardian objects. If an OSS le is specied, Guardian le-
system error 2 occurs.
RETURN VALUES
The SPT_UNLOCKREC() function returns 0 (zero) upon successful completion. Otherwise,
this function returns a nonzero Guardian le-system error number that indicates the outcome of
the operation.
For information about Guardian le-system error numbers, see the Guardian Procedure Errors
and Messages Manual.
ERRORS
None. This function does not set the errno variable.
RELATED INFORMATION
Functions: SPT_CANCEL(2), SPT_CONTROL(2), SPT_FILE_CLOSE_(2),
SPT_FILE_OPEN_(2), SPT_LOCKFILE(2), SPT_LOCKREC(2), SPT_READLOCKX(2),
SPT_READUPDATELOCKX(2), SPT_READUPDATEX(2), SPT_READX(2),
SPT_SETMODE(2), SPT_UNLOCKFILE(2), SPT_WRITEREADX(2),
SPT_WRITEUPDATEUNLOCKX(2), SPT_WRITEUPDATEX(2), SPT_WRITEX(2).
7318 Hewlett-Packard Company 527186-005