SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
D-30
Using DEFINEs From SQLCI
Using DEFINEs From SQLCI
These rules apply to the use of DEFINEs in SQLCI:
Make sure DEFMODE is set. To inherit DEFINEs from the process that starts 
SQLCI, such as TACL or the OSS shell, set DEFMODE ON before you start 
SQLCI. To avoid inheriting DEFINEs, set DEFMODE OFF before you start SQLCI, 
then set it ON within SQLCI.
DEFINEs that you create during an SQLCI session remain in effect until you alter 
them, delete them, or end the SQLCI session. DEFINEs you inherit from another 
process and then modify with SQLCI commands revert to their previous attribute 
values (that is, the values they had when you started SQLCI) when you end the 
SQLCI session. Any changes you make to inherited attributes within the SQLCI 
session apply only until you exit SQLCI.
Except for statements compiled with PREPARE, SQLCI resolves DEFINE names 
in a statement at the time you enter the statement.
If you use PREPARE to compile an SQLCI statement when a CONTROL QUERY 
BIND NAMES AT EXECUTION directive is not in effect, SQLCI resolves DEFINE 
names in the statement when you enter the PREPARE, using the DEFINE values 
at that time. Subsequent executions of the statement use the PREPARE-time 
DEFINE values.
If you use PREPARE to compile an SQLCI statement when a CONTROL QUERY 
BIND NAMES AT EXECUTION directive is in effect, SQLCI resolves DEFINE 
names in the statement when you execute the statement, using the DEFINE values 
at that time. (Note that CONTROL QUERY BIND NAMES AT EXECUTION TIME 
must be in effect at PREPARE-time to cause execution-time DEFINE resolution; 
whether it is in effect at execution-time makes no difference.)
DEFINEREADATTR Returns an attribute value for a DEFINE or for the 
working attribute set
DEFINERESTOREWORK Restores the working attribute set from the background 
set
DEFINESAVEWORK Saves the working attribute set in the background set
DEFINESETATTR Alters the value of an attribute in the working set, or 
resets the attribute
DEFINESETLIKE Sets all attributes of the working set to match those of 
an existing DEFINE
DEFINEVALIDATEWORK Checks the working set for consistency and 
completeness










