SQL/MP Programming Manual for COBOL

SQL/MP System Procedures
HP NonStop SQL/MP Programming Manual for COBOL529758-003
5-3
SQLADDR
From TACL or SQLCI, enter an ADD DEFINE (or ALTER DEFINE) command. Do
not include a backslash (\) or a space before the node name. For example, this
command adds a new DEFINE for the $SQL.MSG.FRENCH message file on the
\PARIS node:
ADD DEFINE =_SQL_MSG_PARIS,CLASS MAP,FILE $SQL.MSG.FRENCH
For the _SQL_MSG_system DEFINE to be in effect for an SQLCI session, you
must add or change the DEFINE before you start the SQLCI session. If you add or
change the DEFINE after you start the session, SQL/MP returns warning message
10201, which indicates that the DEFINE has been changed but the old message
file is still in effect.
From a COBOL program, call the DEFINEADD (or DEFINESETATTR) system
procedure. Your program must add or alter the DEFINE before it calls a system
procedure that opens and reads the SQL message file. Otherwise, your program
uses the default message file. For more information about system procedures, see
the Guardian Procedure Calls Reference Manual.
SQLADDR
The SQLADDR procedure returns the address of an input parameter, output variable,
or indicator variable to an input or output SQLDA structure. This procedure is used only
for dynamic SQL operations.
variable-name
is the name of an input parameter, output variable, or indicator variable.
variable-name must be defined in the Data Division.
Specify the name in the GIVING clause:
If variable-name is the name of an input parameter or output variable,
specify VAR-PTR in the GIVING clause.
If variable-name is the name of an indicator variable, specify IND-PTR in
the GIVING clause.
sqlda-name
is the name of an input or output SQLDA structure. sqlda-name is defined in the
Data Division by an INCLUDE SQLDA directive.
For more information about the SQLADDR procedure, see Section 10, Dynamic SQL
Operations.
ENTER TAL "SQLADDR"
USING variable-name
GIVING { VAR-PTR }
{ IND-PTR }
OF SQLVAR OF sqlda-name.