Declaration of large object type host variables in REXX embedded SQL applications

When you fetch a LOB column into a REXX host variable, it is stored as a string. LOB columns are handled in the same manner as other character-based SQL types such as CHAR, VARCHAR, GRAPHIC, and LONG.

On input, if the size of the contents of your host variable is larger than 32K, or if it meets other criteria that are listed in the following table, it is assigned the appropriate LOB type.

In REXX SQL, LOB types are determined from the string content of your host variable as follows:

Host variable string content Resulting LOB type
:hv1='ordinary quoted string longer than 32K ...'
CLOB
:hv2="'string with embedded delimiting quotation marks ",
"longer than 32K...'"
CLOB
:hv3="G'DBCS string with embedded delimiting single ",
"quotation marks, beginning with G, longer than 32K...'"
DBCLOB
:hv4="BIN'string with embedded delimiting single ",
"quotation marks, beginning with BIN, any length...'"
BLOB