You can type any combination of characters in a floating-point
field (but only the digits 0 through 9, sign characters (+ or -), E or e,
decimal point (.), and comma (,) are valid).
An error message is issued if you type any other character
in a floating-point field.
A floating-point value consists of five parts:
- Significand sign
- Significand
- Exponent character
- Exponent sign
- Exponent
The following figure shows the five parts of a floating-point value.
The parts in the figure are as follows:
- Significand sign
- Use + for a positive value and - for a negative value.
- On output, the significand sign is not displayed for a positive value.
- On input, the significand sign is optional. If you do not type a + or
-, the significand is assumed to be positive.
- Significand
- The digits 0 through 9 and a decimal point (.) or a comma (,) are valid.
- On output, the number of digits in the significand is determined by the
length specified (positions 30 through 34). The location of the decimal point
or the comma is determined by the decimal positions you specify (positions
36 and 37).
- On input, you must type the significand. Only digits 0 through 9 are valid.
The decimal point or comma is optional. If you do not specify a decimal point,
a decimal point is assumed on the right.
- Exponent character
- E or e are valid.
- On output, the exponent character always displays.
- On input, you must type an exponent character if the floating-point value
includes an exponent.
- Exponent sign
- Use + for a positive value and - for a negative value.
- On output, the exponent sign always displays.
- On input, the exponent sign is optional. If you do not type a + or a -,
the exponent is assumed to be positive.
- Exponent
- The digits 0 through 9 are valid.
- On output, the exponent is always 3 digits.
- On input, you must type at least 1 digit if you type the exponent character
(E or e). You can type a maximum of 3 digits.
Notes: - When a floating-point value displays, embedded blanks are removed. On
input, you can type blanks before or after a floating-point value. Within
a floating-point value, blanks are allowed between the significand and the
exponent character.
- If you do not type a value in a displayed floating-point field, a positive
zero is assumed.
- A value of negative zero is valid in a floating-point field. Only the
first zero to the left of the decimal point displays. A minus sign displays
to the left of the first zero.
- A value of positive zero is valid in a floating-point field. The significand
sign (+) does not display. Only the first zero to the left of the decimal
point displays.
- You can type a fixed-point value in a floating-point field.
The display length for a floating-point field is seven
positions greater than the length specified in positions 30 through 34. The
seven extra positions are for the significand sign, the decimal point or comma,
the exponent character, the exponent sign, and the three exponent digits.
The Data type and keyboard shift coding example and the Example data type
and keyboard shift coding instructions table in the Date (L), Time (T), and Timestamp (Z) topic
show how the data you type is passed to your program.