IBM Support

Comma as decimal point

Technote (FAQ)


Question

My DB2® subsystem is tailored to use a comma as the decimal point. How should I enter or receive a decimal number in SQL statements?

Answer

If you issue an INSERT or UPDATE from SPUFI, use a comma as the decimal point.

If you issue an INSERT or UPDATE from a program written in a language other than COBOL, use a period for the decimal point. When you select a decimal number from a table into a host variable that is declared as decimal, double, or float, the host variable has a period as the decimal point unless your program is in COBOL.

In order to use the comma as the decimal point in a COBOL program, you must make this specification at compile time.

Document information

More support for: DB2 for z/OS

Software version: 7.0, 8.0, 9.1

Operating system(s): z/OS

Reference #: 1159601

Modified date: 17 December 2016


Translate this page: