Decimal point

The default decimal point can be specified:

The default decimal point can be specified through the following interfaces:

Table 22. Default Decimal Point Interfaces
SQL Interface Specification
Embedded SQL The *JOB, *PERIOD, *COMMA, or *SYSVAL value in the OPTION parameter is specified on the Create SQL Program (CRTSQLxxx) commands. The SET OPTION statement can also be used to specify the DECMPT parameter within the source of a program containing embedded SQL.

(For more information about CRTSQLxxx commands, see the Embedded SQL programming topic.)
Interactive SQL and Run SQL Statements The DECPNT parameter on the Start SQL (STRSQL) command or by changing the session attributes. The DECMPT parameter on the Run SQL Statements (RUNSQLSTM) command.

(For more information about STRSQL and RUNSQLSTM commands, see the SQL programming topic.)
Call Level Interface (CLI) on the server SQL_ATTR_DATE_FMT and SQL_ATTR_DATE_SEP environment or connection variables

(For more information about CLI, see the SQL Call Level Interfaces (ODBC) topic.)
JDBC or SQLJ on the server using IBM(R) Developer Kit for Java Decimal Separator conneciton property

(For more information about JDBC and SQLJ, see the IBM Developer Kit for Java(TM) topic in the iSeries Information Center.)
ODBC on a client using the iSeries Access Family ODBC Driver Decimal Separator in the Advanced Server Options in ODBC Setup

(For more information about ODBC, see the iSeries(TM) Access category in the iSeries Information Center.)
JDBC on a client using the IBM Toolbox for Java Format in JDBC Setup

(For more information about ODBC, see the iSeries Access category in the iSeries Information Center.)

(For more information about the IBM Toolbox for Java, see IBM Toolbox for Java topic in the iSeries Information Center .)

If the comma is the decimal point, the following rules apply:

Thus, to specify a decimal constant without a fractional part, the trailing comma must be followed by a non-blank character. The non-blank character can be a separator comma, as in:

   VALUES(9999999999,, 111)