Guardian Procedure Calls Reference Manual

Returned Value
INT
A file-system error code that indicates the outcome of the call:
Syntactically correct name found for count; see description of count parameter.0
The form of the name found is incorrect; also, various program and resource errors.13
Considerations
The syntax checking performed by FILENAME_SCAN_ includes checks that the lengths of
individual name parts are acceptable. (For example, it checks that a subvolume name is no
more than 8 characters long.) Unless a name occupies the entire input string,
FILENAME_SCAN_ also requires that the character following the name must not belong to
the set of characters that can appear in a file name or file-name pattern.
FILENAME_SCAN_ checks only that some left-hand part of the input string is a valid name; it
does not require that the name occupy the entire string. If you need such a check, you can
compare the length of string to the returned count.
Example
The following example checks that name is a valid file name with a length of namelen bytes:
error := FILENAME_SCAN_ ( name:namelen, count );
IF error <> 0 OR count <> namelen THEN ! if bad name then
CALL BAD^FILENAME^FOUND; ! call user procedure
Related Programming Manual
For programming information about the FILENAME_SCAN_ procedure, see the Guardian
Programmer's Guide.
FILENAME_SCAN_ Procedure 593