Large Decimal Support - Teradata Preprocessor2

Teradata® Preprocessor2 for Embedded SQL Programmer Guide - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata Preprocessor2
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2023-11-20
dita:mapPath
nyr1691484085721.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
xfi1470440464166
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)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);