Numeric Fields
A numeric field is restricted to number, decimal, and sign (-) entries. Examples include amounts, prices, and quantities.
The Numeric fields overlay, shown in Figure 2-4-30, permits you to add numeric-specific attributes to those already defined for the field. It automatically displays after you complete the entries on the Fields specifications screen if the Field Type you select is NUMERIC.
Figure 2-4-30. Numeric Fields Overlay
The Numeric fields overlay contains the following fields:
· Digits — Left. Enter the number of digits to the left of the decimal.
· Digits — Right. Enter the number of digits to the right of the decimal.
· Signed? specifies whether the numbers entered in this field are positive or negative. “No” would ensure that only positive numbers are entered. The default is “no” if no digits have been defined to the right of the decimal, "yes" if digits have been defined to the right of the decimal. Click the checkbox to toggle between “yes” and “no”.
· Descriptive provides a longer, more easily understood alternative to Field Name, one that is not required to be unique within an application. If blank at all default levels, Field Name is used.
· Column Hdgs designates up to two lines of column heading text. The APPX output process facility uses this text to generate standard column heading images for Start of Page and Start of Range class frames. For cosmetic reasons, the length of headings should not exceed the length of a field itself. Refer to Standard Column Heading Image for additional information.
· Auto Seq? Select “yes” if this numeric field represents a sequence number with a value that should be maintained by APPX. Click the checkbox to toggle between “yes” and “no” . Note that Auto Seq? only appears if the numeric field has no decimal places.
From the Numeric fields overlay, you can access the additional attributes option, shown in Figure 2-4-31.
Figure 2-4-31. Numeric Fields Additional Attributes Overlay
The numeric fields Additional Attributes overlay contains the following fields:
· Dflt Display Msk designates the format that the data displays to a user in an APPX image. This entry establishes the Display Mask default for all image items that reference the numeric field. If blank, APPX uses a display of nonfixed leading spaces with one significant digit. Refer to the Numeric Domains section (near Figure 2-3-16) in Chapter 2-3 for additional information about this entry.
· Default Value establishes a starting value for all image items whenever they first display in add mode in an input image, unless modified by a user. If blank, the starting value is assumed to be the null value.
· Range Checks defines a series of allowable values that APPX uses for online data validation. The first component represents the relation. The options are EQ (equal to), NE (not equal to), GT (greater than), LT (less than), GE (greater than or equal to), and LE (less than or equal to). The second component represents the value that is assigned to the relation. If you enter two relations, APPX infers an AND relationship.
· Occurrence determines the number of times a field is present in a record. If blank, APPX assumes a value of 1. This field may contain up to five numeric characters and is restricted to a maximum of 32,767. See the Occurrence section for a more comprehensive discussion of this field.
· Print Totals? Select “yes” to indicate that this field should be automatically totaled on reports. This field is used as a default for the auto-total specification in output and inquiry process definition. Click the checkbox to toggle between “yes” and “no” values.
· Storage Type determines the internal storage format for data. The Storage Type options are:
BINARY — The number is stored in binary form. The high order bit determines the sign: on or 1 for positive, and off or 0 for negative. The decimal position is established by the Decimals — Left/Right entries. The maximum field length is 10 digits for non-decimal numbers or 9 digits for decimal numbers.
FIXED DECIMAL employs a packed decimal format that stores two decimal digits for each byte with the exception of the last bit, which is the sign bit. The decimal position is established by the Decimals — Left/Right entries. The maximum field length is 31 digits.
FLOATING DECIMAL employs a combination of binary and packed decimal formats that always requires a total of nine bytes of storage. Although the field definition allows for 15 digits to the left of the decimal point plus 15 digits to the right of the decimal point, only the first 15 digits of the actual number are stored. These 15 digits are stored as packed decimal with two decimal digits for each byte (for a total storage requirement of eight bytes). The final byte (binary) determines the maximum number of digits that currently appears to the right of the decimal.
The default is FIXED DECIMAL. For a comprehensive discussion of these options, see Numeric Storage Types in Chapter 2-3.