You can only type the numbers 0 through 9 into the field (no blanks,
no plus sign, no minus sign).
To leave the field, press the Field Exit key, the Field+
key, the Field- key, or a cursor movement key. If you do not type any data
into the field, you can press the Enter key.
You should consider the following differences when you choose between signed
numeric (S) and numeric only (Y):
- Signed numeric restricts the characters that you can type into the field
to the numbers 0 through 9.
- You cannot specify S in position 35 if you also specify the EDTCDE or
EDTWRD keyword.
- Numeric-only performs character removal to remove nonnumeric characters;
signed numeric prevents you from typing in these characters at all.
For input-capable fields only, the display length for the field is one
more than the length specified in positions 30 through 34. The farthest right
position on the display is reserved for a minus sign.
The following considerations apply when the
i5/OS™ operating
system passes the contents of a signed numeric field to your program:
- Your program always sees a numeric, right-aligned, zero-filled field.
- The field is displayed as a right-aligned, blank-filled field unless you
specify CHECK(RZ). If you specify CHECK(RZ), the field is displayed as right-adjusted
and zero-filled.
- The i5/OS operating
system does not perform decimal alignment.
- The i5/OS operating
system does not remove characters from the field (as it does for numeric only
fields).
When an input-capable signed numeric field displays and you do not specify
CHECK(RZ), the i5/OS operating
system performs zero suppression by default (the EDTCDE and EDTWRD keywords
are not valid for signed numeric fields).
Negative numbers are handled as follows:
- On input, you must type the number and press the Field- key. The number
is right-aligned in the displayed field with a minus sign in the farthest
right position. The i5/OS operating
system converts the farthest right significant digit to hex Dn where n is
the significant digit, before passing the number to your program. For example,
if you type 12345 and press the Field- key, 12345- is displayed and your program
sees X'F1F2F3F4D5'.
- On output, the i5/OS operating
system converts hex D in the farthest right digit to hex F. This changes the
negative number to a positive number for display purposes and displays a minus
sign in the farthest right (additional) position in the displayed field. For
example, if your program sees X'F1F2F3F4D5', the number appears on
the display as 12345-.
For examples of signed numeric fields, and sample data typed into them,
see the Data Type and Keyboard Shift Coding Example in the Date (L), Time (T), and Timestamp (Z) topic.