SQL/MP Installation and Management Guide
Managing Database Applications
HP NonStop SQL/MP Installation and Management Guide—523353-004
10-31
DEFINE Rules
•
The DEFMODE option must be set to ON to enable adding DEFINEs. The
DEFMODE setting remains in effect for the duration of the command interpreter or
SQLCI session in which the setting is established.
These are the DEFMODE settings and the commands to set them:
•
SQL/MP statements and commands recognize DEFINEs but do not recognize file
names set by the command interpreter ASSIGN command.
General Guidelines
These general guidelines apply to using DEFINEs:
•
Using DEFINEs that identify the wrong objects causes errors or ambiguity. In
general, the user cannot determine the effects of using a DEFINE at run time;
therefore, a query or program could access the wrong SQL object if security is not
properly set. Be sure that the DEFINEs in effect identify the objects you want to
use.
•
If the DEFMODE option is set to ON when you start an SQLCI session, SQLCI
inherits all the DEFINEs already set for the command interpreter process.
•
Putting DEFINE commands in an OBEY command file, by using a text editor, is a
simple way to ensure the consistency of the environment. To set DEFINEs, place
the SET DEFMODE ON command first, and then include an ADD DEFINE or
ALTER DEFINE command for each DEFINE. If the DEFINE set is shared by
multiple users, each user must run the OBEY command file at the command
interpreter prompt.
•
After you create a DEFINE, it stays in effect until you change it with the ALTER
DEFINE command, delete it with the DELETE DEFINE command, disable the use
of DEFINEs in the current SQLCI session with the SET DEFMODE OFF
command, or end the session or the process. If you create DEFINEs in an SQLCI
session, they are released when the session ends. If you create the DEFINEs in a
command interpreter session, they remain in effect until you delete or alter them or
until you log off.
SET DEFMODE ON Enables DEFINEs; a new process inherits the DEFINE
set from the initiating process. This setting is the default
value.
SET DEFMODE OFF Disables DEFINEs; a new process inherits only the
=_DEFAULTS DEFINE from the initiating process.