SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
D-32
DEFINE Attributes
DEFINEs you create from an executing program remain in effect until you alter
them, delete them, or terminate the program. DEFINEs you inherit from another
process and then modify within an executing program revert to their previous
attribute values (that is, the values they had when you started the program) when
the program terminates. Any changes you make to inherited attributes within the
program apply only within the program.
DEFINE names in a static SQL statement that was compiled WITHOUT a
CONTROL QUERY BIND NAMES AT EXECUTION directive in effect are resolved
at SQL-load time (just before the first SQL statement in the program executes) by
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.
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:
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