Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual—522629-013
5-231
FNAMECOLLAPSE Procedure (Superseded by
OLDFILENAME_TO_FILENAME_ Procedure)
external-name output
STRING:ref:26 or STRING:ref:34
returns the external form of
internal-name. If internal-name is a local file
name,
external-name contains a maximum of 26 bytes; if a network name is
converted,
external-name contains a maximum of 34 bytes. (See the
FNAMEEXPAND procedure.)
Considerations
•
Invalid file names
It is the responsibility of the program calling FNAMECOLLAPSE to pass a valid file
name in
internal-name. Invalid file names cause unpredictable results such as
retrieving information from the wrong file.
•
Passing a bad sysnum value
If
internal-name is in network form, and the system number in the second byte
does not correspond to any system in the network, FNAMECOLLAPSE supplies
“??” as the system name.
•
System names as filenames
The procedure does not always attach system names so that it will work properly
as a filename. For example, the internal filename for an unnamed process
produces a printable string; however, the string is not acceptable as a filename.
Example
LENGTH := FNAMECOLLAPSE ( INTNAME , EXTNAME );
Note. If INTNAME is passed in local internal form, for example “$SYSTEM SUBVOL
MYFILE”, it converts to the external local form “$SYSTEM.SUBVOL.MYFILE”.
If INTNAME is passed in network form, for example “\sysnumSYSTEMSUBVOL MYFILE”, it
converts to the external network form, “\system-name.$SYSTEM.SUBVOL.MYFILE”.