SQL Programming Manual for TAL
Error and Status Processing
HP NonStop SQL Programming Manual for TAL—527887-001
6-18
Initializing the EYE^CATCHER Field
Initializing the EYE^CATCHER Field
To initialize the EYE^CATCHER field in the SQLDA, use the SQLDA^EYE^CATCHER
literal declaration:
sqlda^name.EYE^CATCHER ':=' SQLDA^EYE^CATCHER;
where sqlda^name is the SQLDA in your program.
If you specify an SQLDA structure with a release that is different from the release of
the SQL compiler, NonStop SQL appends an _R1 or _R2 to SQLDA_EYE_CATCHER
declaration. For example, you are using NonStop SQL release C30 and you specify a
C10 SQLDA structure, the flag ^R1 is appended to the SQLDA^EYE^CATCHER
declaration (SQLDA^EYE^CATCHER^R1).
Using Literal Declarations for the SQLDA
Use the literal declarations in the TALDECS file as values in the SQLDA DATA^TYPE
and PRECISION fields. To include these declarations in your program, use the
SOURCE directive. For example:
?SOURCE $ volume. subvol.TALDECS
Table 6-5 and Table 6-6 show the literal declarations in the TALDECS file.
NULL^INFO * For input parameters, NULL^INFO contains a negative integer
if the parameter could contain a null value.
For output columns, NULL^INFO contains a negative integer if
the column could contain a null value. (To verify whether the
parameter or column is really null, check for a negative value at
the location shown in IND^PTR).
VAR^PTR VAR^PTR is the extended address of the actual data (the value
of the input parameter or output column). The extended
address is not returned by NonStop SQL; your program must
initialize VAR^PTR to point to the input and output data buffers.
IND^PTR * IND^PTR is the extended address of a flag that indicates
whether or not a parameter or column is actually null.
If your program must process null values, initialize IND^PTR to
a valid address. For input parameters, the program then sets
the flag pointed to by IND^PTR to -1 if the parameter is null
and 0 if the parameter is not null. For output columns, NonStop
SQL initializes the flag pointed to by IND^PTR to -1 if the
column is null and to 0 if the column is not null.
If your program does not need to process null values, initialize
IND^PTR to an invalid address.
* This data item is generated only when you specify RELEASE2 in the INCLUDE SQLDA directive.
Table 6-4. SQLDA Fields (page 2 of 2)
Field Name Description