Punctuating Numbers

 How to:

Countries differ in how they punctuate numbers, and you can reflect these differences in your reports using Continental Decimal Notation (CDN) which is specified with the CDN SET parameter. The CDN SET allows you to choose to punctuate numbers with a combination of commas, decimals, spaces, and single quotation marks.

The CDN SET parameter can be used in a report request but is not supported in DEFINE or COMPUTE commands.

Note: The punctuation specified by the CDN parameter also determines the punctuation used in numbers affected by the CENT-ZERO SET parameter.

Syntax: How to Determine the Punctuation of Large Numbers

`SET CDN = option`

where:

option

Determines the punctuation used in numeric notation. The options are:

• ON, which uses CDN. For example, the number 3,045,000.76 is represented as 3.045.000,76.
• OFF, which turns CDN off. For example, the number 3,045,000.76 is represented as 3,045,000.76. This value is the default.
• SPACE, which separates groups of three significant digits with a space instead of a comma, and marks a decimal position with a comma instead of a period. For example, the number 3,045,000.76 is represented as 3 045 000,76.
• QUOTE, which separates groups of three significant digits with a single quotation mark (') instead of a comma, and marks a decimal position with a comma instead of a period. For example, the number 3,045,000.76 is represented as 3'045'000,76.
• QUOTEP, which separates groups of three significant digits with a single quotation mark (') instead of a comma, and marks a decimal position with period. For example, the number 3,045,000.76 is represented as 3'045'000.76.

Example: Displaying Numbers Using Continental Decimal Notation

The following table shows how 1234.56 is displayed, depending on the setting of CDN.

CDN Setting

Result

OFF

1,234.56

ON

1.234,56

SPACE

1 234,56

QUOTE

1'234,56

QUOTEP

1'234.56

Example: Determining the Punctuation of Large Numbers

In the following request, CDN is set to ON which punctuates numbers using a period to separate thousands, and a comma to separate decimals.

```SET CDN = ON
TABLE FILE EMPLOYEE
PRINT LAST_NAME FIRST_NAME SALARYEND```

The output is:

`LAST_NAME        FIRST_NAME           SALARY`
```STEVENS          ALFRED           \$11.000,00
SMITH            MARY             \$13.200,00
JONES            DIANE            \$18.480,00
JONES            DIANE            \$17.750,00
BANNING          JOHN             \$29.700,00
IRVING           JOAN             \$26.862,00
IRVING           JOAN             \$24.420,00
ROMANS           ANTHONY          \$21.120,00
MCCOY            JOHN             \$18.480,00
BLACKWOOD        ROSEMARIE        \$21.780,00
MCKNIGHT         ROGER            \$16.100,00
MCKNIGHT         ROGER            \$15.000,00
CROSS            BARBARA          \$27.062,00
CROSS            BARBARA          \$25.775,00```
 WebFOCUS