A varying-length opaque data type
When you specify the VARIABLE keyword for the INTERNALLENGTH modifier, you create a varying-length opaque data type. The default maximum size for a varying-length opaque data type is 2 kilobytes.
To specify a different maximum size for a varying-length opaque data type, use the MAXLEN modifier. The maximum internal length for a varying-length opaque type is 32740 bytes. When you specify a MAXLEN value, the database server can optimize resource allocation for the opaque data type. If the size of the data for an opaque data type exceeds the MAXLEN value, the database server returns an error. A varying-length opaque data type is also limited to 195 columns within the 32740 byte maximum length.
CREATE OPAQUE TYPE var_type (INTERNALLENGTH=VARIABLE,
MAXLEN=4096);
Only the last member of the internal structure can be of varying size.
The C data structure for a varying-length opaque type must be stored in an mi_lvarchar data structure. For information about mi_lvarchar, refer to the HCL OneDB™ DataBlade® API Function Reference.