Guardian Procedure Calls Reference Manual

The system allows certain processes, which are distinguished by having a device subtype of
30, to simulate device types. During a file name search, these processes are normally sent a
system message inquiring about the device-type and subtype values they present. The result
of this inquiry is used for selection under the device-type and device-subtype selection
criteria and for information reporting by FILENAME_FINDNEXT[64]_.
You can suppress device type simulation by specifying options.<10> = 1. Without device-type
simulation, all simulator processes and their subprocesses show a device type of 0 and a
subtype of 30.
When searching for only disk files, the search is usually more efficient if you use the
device-type parameter to restrict the search to disk devices. Otherwise, time is spent making
inquiries to nondisk devices (which can have subdevices of various device types that must also
be searched) and simulator processes (which can have subprocesses of various simulated
device types that must also be searched).
Error Handling
A section of a search pattern can be termed generic if it does not designate a specific entity (that
is, if the section contains an asterisk or a question mark, or if the section is to the right of such a
character). For example, the destination section $* is generic; the destination section in \sys.$dev.*
is not generic. In \*.$dev, both the node and the destination sections are generic.
Some entities that should be inspected during a search might be offline. This can occur because
either a node is not connected (error 250) or a device is down (errors 62-66). But if the section of
the search pattern corresponding to the offline entity is generic, the normal action of
FILENAME_FINDNEXT[64]_ is to bypass the offline entity without reporting the error. Such an error
is termed a generic offline error. You can cause FILENAME_FINDNEXT[64]_ to report all offline
errors, including generic offline errors, by specifying options.<12> = 1. (Note that it is possible
that some remote nodes are not known to the local node because the local node has not
communicated with them since the node was system loaded; offline errors are not reported in such
cases, regardless of the value of options.)
Errors associated with entities that are designated explicitly (that is, not generically) are always
reported. This includes not only offline errors but also such errors as error 18 (node does not exist)
and error 14 (device does not exist).
Example
! process all six-byte file names in the current subvolume
error := FILENAME_FINDSTART_ ( searchid,, 2 ); ! return only
! level 2 name
! part
IF NOT error THEN
error := FILENAME_FINDNEXT_ ( searchid, name:128,
namelen );
WHILE NOT error DO
BEGIN
IF namelen = 6 THEN ... ! process name !
error := FILENAME_FINDNEXT ( searchid, name:128,
namelen );
END;
error := FILENAME_FINDFINISH_ ( searchid );
Related Programming Manual
For programming information about the FILENAME_FINDSTART_ procedure, see the Guardian
Programmer's Guide.
582 Guardian Procedure Calls (F)