When values are assigned or transferred, the source data type and the target data type must be compatible (see section “Compatibility between data types”).
Other rules depend on where the values are being transferred to or from.
A distinction is made between the following:
Entering values in table columns
Default values for table columns
Values for placeholders
Storing values in host variables or a descriptor area
Transferring values between host variables and a descriptor area
Modifying the target data type by means of the CAST operator
Supplying input parameters for routines
Entering values in a procedure parameter (output) or local variable
The following sections provide you with an overview of the assignment rules for the abovementioned cases.