Guardian Procedure Calls Reference Manual
Returned Value
INT
Outcome of the call:
The file names do not refer to the same object.-1
The file names refer to the same object.0
A file-system error prevented evaluation; the returned value is the file-system error code.> 0
Considerations
CAUTION: Passing an invalid file name to this procedure can result in a trap, a signal, or data
corruption. To verify that a file name is valid, use the FILENAME_SCAN_ procedure.
• The name comparison is not case sensitive. For example, these file names refer to the same
object:
\SYS99.$BIGVOL.MY.FILE
\sys99.$bigvol.my.file
• If one of the input parameters is a process name with the optional sequence-number field, and
it is being compared to the same name without a sequence-number field,
FILENAME_COMPARE_ considers the names equivalent provided that the named process
currently exists and has the given sequence number; otherwise they are not considered
equivalent. If both names have sequence-number fields, they must be the same for the file
names to be considered the same.
• One or both of the file name parameters can be DEFINE names. For CLASS MAP DEFINEs,
FILENAME_COMPARE_ uses the file name given by the DEFINE to make the comparison. For
DEFINEs of other classes, a DEFINE name is considered equivalent only to the same DEFINE
name.
• The FILENAME_COMPARE_ procedure compares whole file names. If you want to know
whether two file names share a common part (for example, if they are on the same volume),
one or more contiguous sections of each file name can be extracted by using the
FILENAME_DECOMPOSE_ procedure before calling FILENAME_COMPARE_.
Example
status := FILENAME_COMPARE_ ( fname1:len1, fname2:len2 );
Related Programming Manual
For programming information about the FILENAME_COMPARE_ procedure, see the Guardian
Programmer's Guide.
FILENAME_COMPARE_ Procedure 565