Determining DB2 Decimal Notation at Run-time

The Adapter for DB2 generates the appropriate SQL for whichever decimal point notation was selected (period or comma) when the IBM DB2 software was installed, regardless of the FOCUS Continental Decimal Notation (CDN) parameter setting. You can then set the CDN parameter to control how FOCUS displays the numbers.

Continental decimal notation uses a comma to mark the decimal position in a number and uses periods, blanks, or single quotation marks for separating significant digits into groups of three. In FOCUS, to set the CDN parameter, issue the following

SET CDN = cdnvalue 

where:

cdnvalue

Can be one of the following:

OFF uses a period as the decimal separator and a comma as the thousands separator. OFF is the default.

ON uses a comma as the decimal separator and a period as the thousands separator.

SPACE uses a comma as the decimal separator and a space as the thousands separator.

QUOTE uses a comma as the decimal separator and a single quotation mark as the thousands separator.

Regardless of the CDN setting, the adapter generates the appropriate SQL for the decimal point notation (comma or period) selected when the IBM DB2 software was installed using the supplied IBM Application Programming Defaults Panel DSNTIPF. For more information on setting IBM DB2 application defaults, refer to the IBM DB2 Administration Guide. The SET CDN command controls how numbers are displayed in the FOCUS environment.

For example, given the number 3,045,000.76:

SET CDN = ON Displays the number as 3.045.000,76.

SET CDN = OFF Displays the number as 3,045,000.76.

Note: In order for this feature to function correctly, the proper DB2 DSNEXIT data set (for example, DSN910.SDSNEXIT) must be first in the sequence of data sets allocated to DDNAME STEPLIB. If this is not possible at your site, you can place the DSNEXIT data set in the FOCLIB concatenation instead, as FOCUS searches FOCLIB before STEPLIB.


Information Builders