Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual522629-013
5-169
FILENAME_COMPARE_ Procedure
it is a partially qualified file name, the contents of the =_DEFAULTS DEFINE are
used to resolve it. See caution under “Considerations.”
filename2:length2 input:input
STRING .EXT:ref:*, INT:value
specifies the second file name that is compared. The value of
filename2 must
be exactly
length2 bytes long. It must be a valid file name or valid DEFINE
name; if it is a partially qualified file name, the contents of the =_DEFAULTS
DEFINE are used to resolve it. See caution under “Considerations.”
Considerations
The name comparison is not case sensitive. For example, the following 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, refer to
the
Guardian Programmer’s Guide.
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.