Large Decimal Support - Teradata Preprocessor2

Teradata® Preprocessor2 for Embedded SQL Programmer Guide - 17.20

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata Preprocessor2
Release Number
17.20
Published
April 2023
ft:locale
en-US
ft:lastEdition
2023-04-21
dita:mapPath
neh1679404006646.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2446
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.