Guardian Application Conversion Guide

Managing Your Disk Files
Converting Other Parts of an Application
096047 Tandem Computers Incorporated 8–5
Each FILENAME_COMPARE_ file-name parameter must be followed by a colon and
an integer value, which specifies the length in bytes of the file name. In this example,
FILENAME_COMPARE_ compares two file names. The
error
value is then checked
for the results:
! Compare the two file names and check the results.
error := FILENAME_COMPARE_(file^name1:file^name1^length,
file^name2:file^name2^length);
CASE (error) OF
BEGIN
-1 -> ... ! The names are different.
0 -> ... ! The names are the same.
OTHERWISE -> ... ! A file-system error occurred
END;
Using Wild-Card Characters in a File Name
Your existing program might use wild-card characters in a file name to specify a set of
disk files rather than a single file. The D-series operating system allows the following
wild-card characters in all parts of a file name in procedures such as
FILENAME_FINDNEXT_ and FILENAME_MATCH_ :
* Matches zero or more letters, digits, dollar signs ($), or pound signs (#)
? Matches one letter, digit, dollar sign ($), or pound sign (#)
Examples of wild-card characters in D-series name strings are:
File-Name String Specifies
*ZSPI* All files in the current subvolume with names containing ZSPI
Z??? All files in the current subvolume with names that begin with the letter Z and
have exactly four characters
\*.$DATA All $DATA disk volumes on all nodes in the network
??????00 All files in the current subvolume with names that end with the digits 00 and
have exactly eight characters
\*.*.*.* All files on all nodes in the network
\* All nodes in the network