SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
D-28
Using DEFINEs
DEFINE names are easier to understand than Guardian names.
For example, the name =CUSTOMERS is simpler than an actual file name such as
\SYS1.$VOL2.SALES.CSTMERS.
DEFINE names provide location independence.
For example, if you code with DEFINE names, you can rename database objects,
move database objects, or change the database that a program accesses without
changing source code.
NonStop SQL/MP includes a set of DEFINEs that specify values for SQL operations.
These DEFINEs start with the characters “=_” and includes:
=_AUDSERV_XSWAP_node
=_DEFAULTS
=_SORT_DEFAULTS
=_SQL_CAT_HEAP_LIMIT
=_SQL_CMP_EQ_LIMIT
=_SQL_CMP_EVENT
=_SQL_CMP_EVENT_NO0
=_SQL_CMP_NO_KS_MJOIN
=_SQL_cmp_node
=_SQL_EXE_USE_SQAPVOL
=_SQL_MSG_node
=_SQL_RECGEN_node
=_SQL_TM_node_vol
Each of the preceding DEFINES has an entry describing it. If using SQLCI HELP to
access the text, be sure to include the “=_” characters in the DEFINE name.
Use DEFINEs carefully. DEFINEs that identify the wrong objects can cause
unexpected results. Check that the DEFINEs in effect identify the objects that you want
to use. Create Guardian command files or OSS shell scripts for sets of frequently used
DEFINEs.
Using DEFINEs
DEFMODE is an attribute of a process that controls whether you can create DEFINEs
from the process and whether DEFINEs are propagated when the process starts
another process. The process can be a TACL process, an OSS shell process, an
SQLCI process, or a process of your own creation. The DEFMODE attribute can be set
to ON or OFF.
If DEFMODE is ON, you can create, modify, delete, propagate, and display information
about DEFINEs. For example, if you start an SQLCI process from a TACL process with
DEFMODE ON, DEFINEs set in the TACL process are propagated to the SQLCI
process. Similarly, you can set DEFINEs in an OSS shell process and the DEFINEs
are propagated to a process you start from an OSS program with embedded SQL
statements. DEFMODE ON is the default. Note that for OSS processes, DEFMODE
ON becomes the default after the first add_define command is issued.