Decimal positions for display files (positions 36 and 37)

You use these positions to specify the decimal placement within a zoned decimal field and also to specify the data type of the field as it appears in your program.

If you leave these positions blank, the IBM® i operating system assigns a data type of character for the field. If you type in a number in these positions, the IBM i operating system assigns a data type of zoned decimal for the field. The number you specify is the number of positions to the right of the decimal point. The entry must be less than or equal to the field length, with a maximum of 63 positions.

Packed decimal and binary fields are not supported for display files. Therefore, when you refer to fields of these types using the reference function, the data type assigned is zoned decimal with a keyboard shift as follows:
  • If editing is in effect for the field you are defining, the keyboard shift is numeric only (Y in position 35).
  • If no editing is in effect for the field you are defining, the keyboard shift is signed numeric (S in position 35).

If you are using a referenced field, you can override or change these positions. Specify the new value to override decimal positions. To change decimal positions, specify the amount you want the field increased or decreased and precede that number with either a plus (+) or minus (-) sign. For example, an entry of +4 indicates four more digits to the right of the decimal point than in the referenced field.

The example in Date (L), Time (T), and Timestamp (Z) shows how to specify the decimal positions field.