DECIMAL


This keyword defines a decimal numeric field.

You can abbreviate DECIMAL to DEC. For more information, see  Additional numeric field considerations.

Related topic

DECIMAL PACKED (precision, scale)

DECIMAL PACKED is the default, which indicates that the output value is packed decimal with precision and scale. The precision represents the total number of digits; the scale represents the number of digits in the fractional part of the number. 

DECIMAL (precision, scale)

This option is identical to DECIMAL PACKED. 

DECIMAL ZONED (precision, scale)

This option specifies that the output value is decimal-zoned with precision and scale. The precision represents the total number of digits; the scale represents the number of digits in the fractional part of the number. 

Warning

Important

To generate the absolute value of an output field or to ensure that all output fields can be printed, specify the installation option ZONEDDECOVP=(F,F).

DECIMAL EXTERNAL (length, scale)

EXTERNAL indicates a string that contains a character representation of a decimal constant. A decimal point is always placed in the string based on the scale specification. For more information, see  Additional numeric EXTERNAL or CHARACTER field considerations

ROUND

ROUND tells UNLOAD PLUS to round the value, if necessary, during conversion. If you do not specify ROUND, UNLOAD PLUS truncates any digits that it does not need for precision.

FILL

FILL tells UNLOAD PLUS how to handle leading zeros when converting data to DECIMAL EXTERNAL. Specify YES or NO:

  • FILL YES externalizes all leading zeros when converting numeric data types to their external representations. The first character in the external representation of the number is either a minus sign (-) or a plus sign (+). This capability supports applications such as COBOL that require leading zeros in order to edit and check unloaded data properly.
  • FILL NO removes all leading zeros when converting numeric data types to their external representations.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

UNLOAD PLUS for DB2 13.1