Guardian Programmer's Guide

Table Of Contents
Manipulating File Names
Guardian Programmer’s Guide 421922-014
13 - 34
Manipulating File Names: An Example
A map DEFINE. The name contained in the map DEFINE is expanded to its fully
qualified form and displayed.
A name pattern. Every file name that matches the name pattern is displayed in its
fully qualified form.
Because the program reads and processes the Startup message, the user can specify
the input and output file names. For a detailed discussion of the Startup message,
refer to Section 8, Communicating With a TACL Process.
Some sample executions and their results are shown below. These examples assume
that the current default values are \SYSA.$OURVOL.MYSUB and that this subvolume
contains the following files: PROGA, PROGB, PROGC, ZPROGA, ZPROGB, and
ZPROGC:
The last example assumes that =MYMAP is a currently active map DEFINE
containing the file name ZPROGA.
The program is made up of the following procedures:
The INITIAL procedure is the main procedure. INITIAL calls the INITIALIZER
system procedure to read and process the Startup message and then processes
the parameter string supplied in the Startup message. It scans and resolves the
parameter string and then responds according to what the string contains:
²
For a simple file name or a map DEFINE, it calls the PRINT^NAME procedure
to print the name.
²
For a name pattern, it calls the FIND^FILES procedure to process each file
name that matches the pattern.
The START^IT procedure is invoked through the INITIALIZER procedure to
process the Startup message.
The INIT procedure opens the output file and returns the file number.
The PRINT^NAME procedure simply writes the name of a file to the output file.
Command Input Result
> RESOLVE PROGA \SYSA.$OURVOL.MYSUB.PROGA
> RESOLVE PROGZ \SYSA.$OURVOL.MYSUB.PROGZ
> RESOLVE Z* \SYSA.$OURVOL.MYSUB.ZPROGA
\SYSA.$OURVOL.MYSUB.ZPROGB
\SYSA.$OURVOL.MYSUB.ZPROGC
> RESOLVE $ARCHIVE.RECORDS.* All file names in subvolume
\S
YSA.$ARCHIVE.RECORDS
> RESOLVE \*.*.*.* All permanent disk files and all processes with
two
qualifiers on all systems in the network
> RESOLVE =MYMAP \SYSA.$OURVOL.MYSUB.ZPROGA