Digits only (D)

To allow numeric entry, you must use uppershift for the data-entry keyboard and lowershift for the typewriter-like keyboard.

The numbers-only keyboard shift defines a character or numeric field that allows you to key only the digits 0 through 9 into the field. You cannot key special characters or blanks.

The numbers-only keyboard shift is supported only on devices that are configured on the 6040 or 6041 local controller or the 5294 or 5394 Control Unit. When a digits-only field is sent to a device that is not configured on a valid controller type, the field is processed as alphanumeric (keyboard shift A). Because you can type any alphanumeric character into the field, a decimal data error can result in the application program.

The Field Exit, Field+ Exit, and Dup keys are allowed. The Field+ Exit is processed as an unsigned Field Exit. The Field- Exit key is not allowed.

Blank and zero are the only supported values for decimal positions (DDS positions 36 and 37). If positions 36 and 37 are blank, the field is considered a character field. If you specify zero, the field is considered numeric.

You can only enter a positive integer value into a D field.

The display length of a digits-only field is always the field length as specified in positions 30 through 34.

Zero suppression is not supported for digits-only fields. EDTCDE and EDTWRD keywords are not valid, and the i5/OS™ operating system does not perform zero suppression by default, as it does for signed-numeric fields.

You cannot enter blanks into the field. However, you can move the cursor out of the field after entering part of it. If you move the cursor after entering part of the field, when the i5/OS operating system passes the contents of the field to a program, the following considerations apply:

In a database file, you can specify the D keyboard shift on the REFSHIFT keyword if the field data type is numeric or character (S, B, P, or A). For a numeric field, the number of decimal positions must be zero.