IBM Support

Comma as decimal point

Question & Answer


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.

[{"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"7.0;8.0;9.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21159601