The COBOL-to-SQL type mapping did not support JustAN (right-justified strings) COBOL types. JustAN types are now supported by mapping them into VARCHAR field types.
This mapping best mimics the behavior of these fields in COBOL. In particular, varchar is the only SQL type that considers trailing spaces as significant.
Due to the nature of JustAN types, left-side spaces are considered padding. On reading from the COBOL buffer, they are trimmed so they do not appear in SQL, where they would be significant data.
Variable length fields map into SQL LONGVAR* fields.
The XDD structure allows the following elements and attributes for variable length field support.
For an XDD field mapped into a LONG VARCHAR or LONG VARBINARY, the following conditions must be met:
size="0"
sizefield="X" where "X" is a valid field containing the number of bytes (we suggest this field to be hidden, but this is not mandatory)
dbtype="clob" or dbtype="blob"
If one (or more) of the above condition is not met, error CTDBRET_CALLBACK_11 ("Unsupported clob/blob definition") is returned.