Guardian Procedure Calls Reference Manual
Considerations
• The FILE_GETLOCKINFO_ procedure supports single SMF logical files but does not support
entire SMF virtual volumes. If the name of an SMF logical file is supplied to this procedure,
the system queries the disk process of the appropriate physical volume to obtain information
about current lock holders and lock waiters on the file. If the name of an SMF virtual volume
is supplied, but not a full logical file name, an error is returned.
If you call the FILE_GETLOCKINFO_ procedure and supply the name of a physical volume,
lock information is returned for any file on that volume that is open under an SMF logical file
name, but the returned file name is that of the physical file supporting the logical file.
• A valid range for max-participants is 1-2548.
OSS Considerations
This procedure operates only on Guardian objects. OSS files cannot have Guardian locks, so there
is no information to be returned. If an OSS file is specified, error 0, indicating no error, is returned.
Example
! The following code obtains all the available information
! about locks on the specified disk file and about all the
! holders/waiters.
control := 0;
DO
BEGIN
error := FILE_GETLOCKINFO_ ( myfile:length, , , control,
lock^descriptor,
lock^descriptor^len,
participants,
max^participants );
IF (error = 0) ! success, but maybe more locks ! OR
(error = 45) ! more information available ! THEN
BEGIN
-- process the obtained information
END;
END;
UNTIL (error <> 0) AND (error <> 45);
IF error <> 1 THEN ! error 1 means end of info
BEGIN
-- handle the error
END;
438 Guardian Procedure Calls (F)