Guardian Programmer's Guide

Table Of Contents
Guardian Programmer’s Guide 421922-014
7 - 1
7
Using DEFINEs
DEFINEs are file-system elements that provide a means for passing information to a
process. For example, you can use DEFINEs to pass attributes to a process to
provide:
An alternate name for accessing a file
A list of subvolumes to search for a file name
A simple way to set up attributes for labeled-tape processing
A simple means of passing attributes to the spooler subsystem
You can make use of DEFINEs interactively using TACL, or you can work with
DEFINEs programmatically. DEFINEs are stored within the program file segment
(PFS) of the creating process. DEFINEs specified interactively are stored in the PFS
of the TACL process and affect the environment of TACL. The programmatic approach
stores DEFINEs in the context of the creating process and affects the environment of
the creating process. In either case, DEFINEs can be passed on to other processes
when creating new processes. This functionality is also supported in SCF for a generic
process. For more information, see the SCF Reference Manual for the Kernel
Subsystem.
This section discusses how to use DEFINEs programmatically. For details on how to
use DEFINEs with TACL, read the Guardian User’s Guide.
The subsection Working With DEFINEs describes what your process needs to do to
make use of information passed to the process in the form of DEFINEs.
The subsection Adding DEFINEs describes how to add DEFINEs to the process
context by setting up a working set of DEFINE attributes, how to name the set of
attributes, and how to save the working set in the process context. Specifically, you
will learn how to use procedure calls to perform the following tasks:
Control whether your process can create or use DEFINEs (DEFINEMODE
procedure).
Set attributes in the working set (DEFINESETATTR and DEFINESETLIKE
procedures).
Check the working set for errors (DEFINEVALIDATEWORK procedure).
Assign a name to a group of DEFINE attributes, thereby adding the DEFINE to the
context of your process (DEFINEADD procedure).
Delete DEFINEs from your process context (DEFINEDELETE and
DEFINEDELETEALL procedures).
Save and restore a working set of DEFINE attributes (DEFINESAVE[WORK[2]]
and DEFINERESTORE[WORK[2]] procedures), and use these techniques for
improving the performance of your program.