Field-definition for field procedures
A field procedure is invoked when a table is created or altered to define the data type and attributes of an encoded value to Db2. This operation is called field-definition.
The
data type of the encoded value can be any valid SQL data type except
DATE, TIME, TIMESTAMP, LONG VARCHAR, or LONG VARGRAPHIC. The length,
precision, or scale of the encoded value must be compatible with its
data type.
A user-defined data type can be a valid field if
the source type of the data type is a short string column that has
a null default value. Db2 casts
the value of the column to the source type before it passes it to
the field procedure.