Edit Codes for Numeric Data

E<Z>
Displays numbers in scientific notation. For example, with this code, the number -1234.56789 would display as -1.234E+03. E is used on the default form for columns with data type FLOAT.

QMF shows up to 17 significant digits when editing floating point data, or up to 34 significant digits when editing extended floating point data, even if the width of the column can accommodate more. The number of significant digits is less for other data types.

Edit code Z in the second position suppresses zero values.

D<Z><C>, I<Z>, J<Z>, K<Z>, L<Z>, and P<Z>
Display numbers in decimal notation, with different combinations of leading zeros, minus signs for negative numbers, thousands separators, currency symbols, and percent signs as shown in Table 15.

Each code can be followed by a number (from 0 to 99) that tells how many places to allow after the decimal point. Numbers with more places after the decimal are rounded; numbers with fewer places are padded with zeros.

On the default form, L is used for all columns with numeric data types other than FLOAT. The number of decimal places used is the same as in the column definition.

You might notice small variances for a value when different edit codes are applied to it. For example, the value 0.068124999 displays as 0.068125 using an edit code of L6. However, using an edit code of L5 results in 0.06812. In this case, the digit 2 is not rounded to 3 because the following digit in the original number is less than five.

Edit code Z in the second position suppresses zero values. An optional edit code C in the second or third position displays the user-defined currency symbol instead of the standard currency symbol. You can define a currency symbol by using the global variable DSQDC_CURRENCY. If you use both Z and C, C must follow Z.

Table 15, following, shows what edit codes D, I, J, K, L, and P provide, and how each formats the number -1234567.885. The display assumes that:

Table 15. Attributes and Examples of Decimal Edit Codes
Edit Code Leading Zeros Negative Sign Thousands Separators Currency Symbol Percent Sign Example
D2 N Y Y Y N -$1,234,567.89
DC2 N Y Y Y N -DM1,234,567.89
I2 Y Y N N N -00001234567.89
J2 Y N N N N 000001234567.89
K2 N Y Y N N -1,234,567.89
L2 N Y N N N -1234567.89
P2 N Y Y N Y -1,234,567.89%
[ Previous Page | Next Page | Contents | Index ]