NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
D-31
DEFINE Attributes
executes), using the DEFINEs in effect at that time. Changing DEFINE values
during program execution has no effect on such a statement.
DEFINE names in a static SQL statement that was compiled with a CONTROL
QUERY BIND NAMES AT EXECUTION directive in effect are resolved just
before each execution of the statement. Changing DEFINE values during program
execution affects such a statement.
Resolution of DEFINE names in dynamic SQL
DEFINE names in a dynamic SQL statement that is compiled by a PREPARE
operation when a dynamic CONTROL QUERY BIND NAMES AT EXECUTION
directive is not in effect are resolved during the PREPARE operation. Changing
DEFINE values after the PREPARE but before a corresponding EXECUTE does not
affect such a statement.
DEFINE names in a dynamic SQL statement that is compiled by a PREPARE
operation when a dynamic CONTROL QUERY BIND NAMES AT EXECUTION
directive is in effect are resolved each time a corresponding EXECUTE occurs.
Changing DEFINE values after the PREPARE but before a corresponding
EXECUTE affects such a statement.
DEFINE names in a dynamic SQL statement compiled by an EXECUTE
IMMEDIATE statement are resolved when the EXECUTE IMMEDIATE statement
executes.
DEFINE Attributes
Each DEFINE has a set of attributes associated with it. The CLASS attribute determines
the function of the DEFINE, as follows:
MAP is the default.
The CATALOG, DEFAULTS, and MAP classes are particularly useful with SQL and
are discussed in more detail in the following pages.
CATALOG Specifies catalog redirection or substitution
DEFAULTS Specifies process defaults such as default volume and subvolume
MAP Specifies redirection or substitution for a table, view, index, collation,
partition, or program name
SEARCH Specifies subvolumes for resolving file names in a search list
SORT Specifies parameters for FastSort processes
SUBSORT Specifies parameters for parallel sort processes
SPOOL Sets parameters for the spooler
TAPE Specifies the attributes of a file on a labeled tape, such as block size and
density