SIZE is raised when the size of the value being assigned to a data item exceeds the declared (or default) size of the data item, even if this is not the actual size of the storage that the item occupies. For example, a fixed binary item of precision (20) occupies a fullword in storage, but SIZE is raised if a value whose size exceeds FIXED BINARY(20) is assigned to it.
Because checking sizes requires substantial overhead in both storage space and run time, the SIZE condition is primarily used for program testing. It can be removed from production programs. For more information on test and production application programs, refer to the Programming Guide.
The SIZE condition differs from the FIXEDOVERFLOW condition in that FIXEDOVERFLOW is raised when the size of a calculated fixed-point value exceeds the maximum allowed by the implementation. SIZE can be raised on assignment of a value regardless of whether or not FIXEDOVERFLOW was raised in the calculation of that value.
If the SIZE condition is raised and it is disabled, the program is in error.
|