Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual522629-013
5-105
FILE_GETOPENINFO_ Procedure
validmask output
INT .EXT:ref:1
returns a value indicating which of the output parameters has returned valid
information. Each parameter has a corresponding bit that is set to 1 if the
parameter is valid for the device, as follows:
<0>
primary-opener
<1> backup-opener
<2> accessmode
<3> exclusion
<4> syncdepth
<5> filename
<6> accessid
Considerations
Opens are not returned in any defined order. In particular, when retrieving
information about all opens on a disk volume, the opens for any one file might not
be grouped together in the sequence of calls.
The FILE_GETOPENINFO_ 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 openers. 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_GETOPENINFO_ procedure and supply the name of a
physical volume that has an open that was made on an SMF logical file name,
information about the open is returned, but the returned file name is that of the
physical file supporting the logical file.
Example
! The following code causes the names of all open files and
! the process handles of the primary and backup openers to be
! returned for the volume identified by search^name:length.
tag := 0;
DO
BEGIN
error := FILE_GETOPENINFO_ ( search^name:length, tag,
pri^opener, back^opener,,,,
name:max^namelen );
END;
UNTIL error <> 0; ! error 0 means success & more opens !
! left; call again !
IF error <> 1 THEN ! error 1 means no more opens !
BEGIN
-- handle error
END;