DB2 Universal Database for iSeries SQL Reference

Fields in an occurrence of a secondary SQLVAR

 

Table 93. Field Descriptions for an Extended SQLVAR

C Name 107
COBOL Name
PL/I Name
RPG Name
Field
Data Type
Usage in DESCRIBE and PREPARE (set by the database manager) Usage in FETCH, OPEN, CALL, and EXECUTE (set by the user prior to executing the statement)
len.sqllonglen
SQLLONGL
SQLLONGLEN
INTEGER The length attribute of a LOB column. The length attribute of a LOB host variable. The database manager ignores the SQLLEN field in the base SQLVAR for these data types. The length attribute indicates the number of bytes for a BLOB or CLOB, and the number of characters for a DBCLOB.
* CHAR(12) Reserved. Provides boundary alignment for SQLDATALEN. Reserved. Provides boundary alignment for SQLDATALEN.
* pointer Reserved. Reserved.
sqldatalen
SQLDATAL
SQLDATALEN
pointer Not used. Used only for LOB host variables.

If the value of this field is not null, this field points to a four-byte long buffer that contains the actual length of the LOB in bytes (even for DBCLOBs). The SQLDATA field in the matching base SQLVAR then points to the LOB data.

If the value of this field is null, the actual length of the LOB is stored in the first four bytes pointed to by the SQLDATA field in the matching base SQLVAR, and the LOB data immediately follows the four-byte length. The actual length indicates the number of bytes for a BLOB or CLOB and the number of double-byte characters for a DBCLOB.

Regardless of whether this field is used, field SQLLONGLEN must be set.

sqldatatype_name
SQLTNAME
SQLDATATYPE-NAME
VARCHAR (30) The SQLTNAME field of the extended SQLVAR is set to one of the following:
  • For a distinct type column, the database manager sets this to the fully qualified distinct type name. If the qualified name is longer than 30 bytes, it is truncated.
  • For a label, the database manager sets this to the first 20 bytes of the label.
  • For a column name, the database manager sets this to the column name.
Not used.


Footnotes:

107
In this column, the lowercase name is the C Name. The first uppercase name is the PL/I and RPG Name. The second uppercase name is the COBOL Name.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]