Guardian Programmer's Guide

Table Of Contents
Manipulating File Names
Guardian Programmer’s Guide 421922-014
13 - 9
Resolving Names
LEVEL,
OPTIONS);
IF ERROR <> 0 THEN ... ! Error condition
ELSE
BEGIN
IF LEVEL = 1
THEN OPTIONS := RESOLVE^SUBVOL
ELSE OPTIONS := 0;
ERROR := FILENAME_RESOLVE_(STRING^BUFFER:COUNT,
FULLNAME:MAXLEN,
FULL^LENGTH,
OPTIONS);
IF ERROR <> 0 THEN ... ! Error condition
END;
Resolving DEFINE Names
The FILENAME_RESOLVE_ procedure does not normally modify DEFINE names. If
you supply a DEFINE name to this procedure, then the return string is usually the
same as the input string but with all uppercase letters. However, you can perform
some processing of DEFINEs by setting appropriate flags in the options parameter:
options bit 12 is the DEFINE-simple-resolve flag, which resolves map
DEFINEs
options bit 11 is the DEFINE-reduction flag, which resolves DEFINEs that
refer to a file name
options bit 10 is the DEFINE-reject flag, which rejects DEFINEs that are not
resolved to a file name
The following paragraphs describe these options in detail. For general information
about DEFINEs, refer to Section 7, Using DEFINEs.
Resolving Map DEFINES
You can resolve a map DEFINE into the name contained in the DEFINE by setting the
DEFINE-simple-resolve flag (bit 12) in the options parameter to 1 before calling
the FILENAME_RESOLVE_ procedure. For any other class of DEFINE, the procedure
returns the DEFINE name.
The DEFINE-simple-reso
lve flag also causes the system to check for the
existence of the DEFINE. The FILENAME_RESOLVE_ procedure returns error 198
(unable to find DEFINE) if the DEFINE does not exist or error 13 (illegal file name) if
DEFINE mode is not turned on.
The following example resolves map DEFINEs and checks for errors:
LITERAL DEFINE^SIMPLE^RESOLVE = %B0000000000001000;
.