Guardian Programmer's Guide

Table Of Contents
Manipulating File Names
Guardian Programmer’s Guide 421922-014
13 - 26
Finding the Next Matching File Name
Reporting Device or System Failures
You can choose to receive notification of failed or offline devices and systems
encountered during a search. To be sure that such errors are always reported, set the
report-off-line flag (bit 12) in the options parameter to 1 before calling
FILENAME_FINDSTART_.
The following example sets the report-off-line flag to 1:
LITERAL REPORT^OFFLINE = %B0000000000001000;
.
.
SEARCH^PATTERN ':=' "\*.*.*.*" -> @S^PTR;
PATTERN^LENGTH := @S^PTR '-' @SEARCH^PATTERN;
OPTIONS := REPORT^OFFLINE;
ERROR := FILENAME_FINDSTART_(SEARCH^ID,
SEARCH^PATTERN:PATTERN^LENGTH,
!resolve^level!,
!device^type!,
!device^subtype!,
OPTIONS);
IF ERROR <> 0 THEN ... !Error condition
Errors that are reported when the report-off-line flag is 1 that might otherwise
not be reported include:
If the report-off-line flag is zero, then devices or systems that are offline or in a
failed state are skipped over when encountered in a search if the device or node is
specified generically (that is, if the device or node part of the file name contains a wild-
card character or if the piece of the file-name pattern to the left of the device name
contains a wild-card character). For example:
When you explicitly specify a device in a file-name pattern, the system always reports
device errors whether the report-off-line flag is set or not.
Finding the Next Matching File Name
After setting up a search using the FILENAME_FINDSTART_ procedure, you can
search for the specified file-name pattern using calls to the FILENAME_FINDNEXT_
procedure.
Errors 62 to
66
Device off line
Error 250 System not connected
\SYSA.$OURVOL.* The node name and volume name are specified explicitly.
Neither is generic.
\SYSA.$*.* The node name is explicit, but the volume (or process) name
is generic.
\*.$OURVOL The node name is generic and the volume name is generic
because the node name is.