Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual522629-013
5-214
FILENAME_UNRESOLVE_ Procedure
The contents of defaults are compared with longname to perform the
unresolved operation.
If used, the value of
defaults must be exactly length bytes long and must be in
the following form:
[[\node.]$volume.]subvolume
Omitted name parts are taken from the =_DEFAULTS DEFINE.
If this parameter is omitted or if
length is 0, the value of the VOLUME attribute of
the =_DEFAULTS DEFINE is used.
Considerations
The FILENAME_UNRESOLVE_ procedure compares a specified file name with the
default subvolume specification and removes left-hand sections that are identical.
It scans the input file name from the left, and when it finds a difference, it returns
that part and everything to the right. Name parts are never removed from the
section indicated by
level or from sections to the right of that point.
Examples
error := FILENAME_UNRESOLVE_ ( longname:longlen,
shortname:maxlen,
shortname-len,
level );
The following table gives some possible input values for the above example, along with
the output. Assume that the current default values are “\SYS.$VOL.SUB”.
Related Programming Manual
For programming information about the FILENAME_UNRESOLVE_ procedure, refer to
the
Guardian Programmer’s Guide.
Caution. Passing an invalid file name or file-name pattern to this procedure can result in a
trap, a signal, or data corruption. To verify that a file name or file-name pattern is valid, use the
FILENAME_SCAN_ procedure.
longname (
input) level shortname (output)
\mysys.$myvol.mysvol.myfile 0 \mysys.$myvol.mysvol.myfile
\sys.$myvol.mysvol.myfile 0 $myvol.mysvol.myfile
\sys.$vol.mysvol.myfile 0 $vol.mysvol.myfile
mysvol.myfile 0 mysvol.myfile
sub.myfile 1 sub.myfile
sub.myfile 2 myfile