This option affects how numeric edited fields with a default value are displayed prior to the user making an entry. The four possible values are:Converted, Unchanged, Left-Adjust, and Formatted.
Converted | is the default setting. When this setting is used, the default value is displayed in a standardized format. This format has an optional leading minus sign, followed by the number, with no leading zeros and no internal formatting characters. |
Unchanged | is an alternate setting. When this setting is used, the default value is displayed without any changes. All of the editing characters appear, and leading spaces are shown. Note that the LEFT, RIGHT, or CENTER phrase will affect the display. After the value has been displayed, the user can edit it normally. |
Left-Adjust | is identical to Unchanged, except that any leading spaces are removed before the value is displayed. |
Formatted | is fundamentally different from the other options in that it affects the way the number is entered, not just the format of the default value. When Formatted entry is selected, the number is continuously reformatted by the ACCEPT statement to match the editing specification of the item being entered. This means that the value will always appear to the user in its "final" form. This is similar to the way numbers are entered on most calculators. Selecting this option has many minor affects on the actions of various editing keys. These are not detailed here, but the actions of the editing keys are analogous to their actions on non-formatted fields. |
There is one exception to the rule that the number will always be formatted just as described by the PICTURE clause. This is when Z or * characters are placed after the decimal point in the PICTURE. In this case, the entered characters will be treated like 9 characters instead. This is necessary in order to allow the user to enter values between zero and 1 when the default value is zero. If this rule did not exist, then when the user tried to enter the decimal point, the reformatter would keep removing it. The same applies to any zero digits between the decimal point and the first non-zero digit.
When the Formatted option is used with left justification, the entry action is also left justified. When it is used with the centering option, the entry occurs as if the field were right justified, and the final result is centered when the user leaves the field.
Place Auto-Prompt immediately after this option, using a comma as a separator, to allow the user to decide whether to change or replace the default value. When Auto-Prompt is specified, the default value will be displayed, and then the program will wait for the user to enter a character. If the character entered is a data character, ACUCOBOL-GT will fill the field with prompt characters (erasing what was there) and then accept data as if this were a new field. If the character entered is an editing character (such as an arrow key), then the program allows the user to edit the data normally. Sample syntax is shown here:
SCREEN EDITED-UPDATES=Converted, Auto-Prompt
This option can also be specified as SCRN_EDITED_UPDATES. The Auto-prompt value can be specified with SCRN_EDITED_AUTO_PROMPT.