Guardian Programmer's Guide

Table Of Contents
Using DEFINEs
Guardian Programmer’s Guide 421922-014
7 - 2
Example Uses for DEFINEs
Section 16, Creating and Managing Processes, also contains additional information
about DEFINEs. It describes how to use the PROCESS_LAUNCH_ procedure to
control how DEFINEs are passed from one process to another during process creation.
For complete details of the syntax of all DEFINE-related procedure calls, see the
Guardian Procedure Calls Reference Manual.
Example Uses for DEFINEs
DEFINEs allow attributes to be grouped and named. These attributes can then be
passed to a process or retrieved simply by specifying the name of the DEFINE.
DEFINEs remove the need to set up attributes each time a given process is invoked.
Specifically, several classes of DEFINEs each pass attributes to a specific process or
class of processes. Examples of classes of DEFINEs include:
CLASS MAP DEFINEs
CLASS SEARCH DEFINEs
CLASS TAPE DEFINEs
CLASS DEFAULTS DEFINEs
CLASS MAP DEFINEs enable a file to be accessed by a DEFINE name as well as the
file name. That is, the DEFINE name is mapped to the file name. The DEFINE name
can then be passed to the file system instead of the file name. In other words, you can
use a CLASS MAP DEFINE to propagate a file name from the process’s creator
without using the startup sequence of messages. This file name can then be passed
to procedures such as FILE_OPEN_ in the form of a DEFINE name, removing the
need to hard code the file name.
CLASS SEARCH DEFINEs contain information to be used for resolving file names with
a search list. It has 21 attributes named SUBVOL0 through SUBVOL20 and another
21 attributes named RELSUBVOL0 through RELSUBVOL20. Each of these attributes
takes the same form and is optional. The value of one attribute is either a single
subvolume specification or a list of them enclosed in parentheses and separated by
commas. A subvolume specification can be a fully or partially qualified subvolume
name, or the name of a CLASS DEFAULTS DEFINE.
With the SUBVOLnn attributes, subvolume name resolution takes place when the
attribute is added; with the RELSUBVOLnn attributes, subvolume name resolution
takes place when the DEFINE is used. The search order for a CLASS SEARCH
DEFINE is as follows:
SUBVOL0
RELSUBVOL0
SUBVOL1
RELSUBVOL1
. . .