Large Decimal Support - Teradata Preprocessor2

Teradata® Preprocessor2 for Embedded SQL Programmer Guide

Product
Teradata Preprocessor2
Release Number
17.00
Published
June 2020
Language
English (United States)
Last Update
2020-06-19
dita:mapPath
whb1544831946911.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

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) or DECIMAL (0) is defined, the option is ignored and the default of 18 digits remains.

Valid values for mainframe systems are:

  • DECIMAL(31)
  • DECIMAL(18)
  • DECIMAL(0)

Example

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

01  EMPLOYEE-RECORD.
	02 EMPNUM					PIC S9(18) COMP.
	02 SALARY					PIC S9(29)V99 COMP-3.