Large Decimal Support - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

Product
Preprocessor2 for Embedded SQL
Release Number
15.00
Language
English (United States)
Last Update
2018-09-27
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

Large Decimal Support

Beginning with PP2 9.2 and Teradata Database V2R6.2, there is support for an increase from 18 digit decimals to 31 digit decimals for mainframe systems and 38 digit decimals for network systems.

The default remains 18 digits, allowing full compatibility with existing programs. To change the default, specify the preprocessor option DECIMAL(nn) or -dec nn. Valid values for network systems are:

  • -dec(38)
  • -dec(18)
  • -dec(0)
  • If –dec(0)is specified, the option is ignored and the default of 18 digits remains.

    Valid values for mainframe systems are:

  • DECIMAL(31)
  • DECIMAL(18)
  • DECIMAL(0)
  • If DECIMAL(0)is specified, the option is ignored and the default of 18 digits remains.

    Example  

    In this example, the employee number is specified as a larger binary integer, and the salary is specified as a larger decimal value:

    DCL 01 EMPLOYEE_RECORD,
    	 02 EMPNUM				BIN FIXED(64), 
    	 02 SALARY				DEC FIXED(29,2);