ContentsIndexPreviousNext

The SCREEN Variable

The runtime configuration file entry SCREEN controls many features of the video sub-system of the Terminal Manager. Attributes you can set are identified by one or more sets of keywords and associated values, separated from each other by spaces or tabs; the syntax is:

   SCREEN  keyword=value  [keyword=value] . . .

The following keywords are supported:

1. ALPHA-UPDATES=value[,Auto-Prompt]

This option works just like the EDITED-UPDATES option except that it applies to alphanumeric fields; the only acceptable value is "Unchanged".

2. CONVERT-OUTPUT=value

Affects only Screen Section DISPLAY statements. If value is "Yes", numeric fields are converted from the internal storage format to a readable form, and the action of the JUSTIFY keyword takes effect. Default is "No".

3. EDITED-UPDATES=value[,Auto-Prompt]

Affects how numeric edited fields with a default value are displayed prior to the user's entry. Possible values are:

Converted (default) The default field value is displayed in a standardized format: an optional leading minus sign, followed by the number, with no leading zeros and no internal formatting characters.

Unchanged The default value is displayed without any changes.

Left-Adjust Identical to Unchanged, except that leading spaces are removed before the value is displayed.

Formatted Affects the way the number is entered, not just the format of the default value. The number is continuously reformatted by the ACCEPT statement to match the editing specification of the item being entered; the value always appears to the user in its "final" form. When used with left justification, the entry action is also left justified. When 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.

When Auto-Prompt is specified immediately after this option (using a comma as a separator) the default value is displayed and the program waits for the user to enter a character. If a data character is entered, ACUCOBOL-GT fills the field with prompt characters and then accepts data as if this were a new field. If an editing character is entered, ACUCOBOL-GT allows the user to edit the data normally.

4. ERROR-BELL=value

Determines when the error bell is sounded. Values are:

All Ring the bell whenever the user makes an entry error or attempts to enter data into a
full field.
Yes (default) Ring the bell on an entry error, but not on field-full.
No
Do not ring the bell on an entry error or on field-full.

5. ERROR-BOX=value

When value is set to "yes" (the default), an error message is displayed in a box. If value is set to "no", the error is reported based on the entry in the SCREEN ERROR-LINE variable (described below).

6. ERROR-COLOR=value

Value is the arithmetic sum of the numbers representing the colors and other attributes used in error messages generated by the runtime system. The following color values are accepted:

Color Foreground Background
value value

Black 1 32

Blue 2 64

Green 3 96

Cyan 4 128

Red 5 160

Magenta 6 192

Brown 7 224

White 8 256

You may specify other video attributes by adding the following values:

Reverse video 1024

Low intensity 2048

High intensity 4096

Underline 8192

Blink 16384

Protected 32768

Only one foreground color and one background color may be specified. If either is missing, the corresponding default for the current terminal window is used. High intensity and low intensity may not both be specified. If neither is specified, the default intensity is used.

For example, to get a blinking white foreground on a blue background, you would specify :

SCREEN   ERROR-COLOR=16456
(16456 = 8+64+16384)

The default value is "4096", which causes the error messages to use the current colors with a high-intensity foreground.

7. ERROR-LINE=value

The screen line number on which you want error messages to appear. If a negative value, the messages appear that many lines from the bottom of the screen. The default value is "-1".

8. FORM-FEED=value

Setting this variable to "yes" and putting "Ctl-L" in a DISPLAY statement allows a form feed to occur. Setting this variable to "no" (the default) disallows a form feed.

9. INPUT-DISPLAY=value

Determines what happens when the DISPLAY verb operates on an input field described in a Screen Section entry. Possible values are:

None The field is not displayed.

Prompt The field's prompt character is displayed.

Spaces (default) The field is displayed as spaces.

Value The current (that is, empty and waiting for input) value of the field is displayed. This is zero for numeric and numeric-edited fields, and spaces for other fields.

10. INPUT-MODE=value

Affects pre-display of data in a Screen Section ACCEPT. Possible values are:

Predisplay The current Screen Section value of each input and update field is displayed. Each field is then entered as an update field (that is, the value can be edited).

Update Each input field's current value is echoed on the screen when the field is visited.

Normal (default) Causes no echoing of input-only fields.

11. JUSTIFY=value

Determines the default justification of converted numeric and numeric-edited fields when they are displayed. Justification affects only fields that have the CONVERT phrase specified or implied for them. Possible values are:

Left Leading spaces are removed.

Right Leading spaces are retained.

Auto (default) Left justification is used if the program was compiled in RM/COBOL compatibility mode; otherwise right justification is used.

12. NUMERIC-UPDATES=value[,Auto-Prompt]

Works just like the EDITED-UPDATES option described above except that it applies to numeric fields instead of numeric edited fields. The possible values are "Converted" and "Unchanged".

13. PROMPT=value

Specifies an alternate prompt character (default is underscore). To specify a space, leave the value empty ("Prompt= ").

14. PROMPT-ALL=value

If value is "Yes", then the prompt character is shown in every field managed by the ACCEPT statement. The prompt characters are removed when the ACCEPT is terminated. Prompts never appear in SECURE fields. Default is "No".

15. PROMPT-ATTR=value

You may specify a prompt attribute. This attribute is used whenever the PROMPT is specified or implied for an ACCEPT statement. The attributes that you can specify are the same as those for the COLOR_MAP runtime configuration variable described on page 29.

16. REFRESH-LINES=value

Value specifies the number of screen lines to redisplay after the user has finished entering data into a field; useful when the terminal or terminal emulator can accept Asian phonetic characters and translate them into ideograms. This option "cleans up" the screen by redisplaying the affected lines with the ideograms in place.

After accepting input data, the Terminal Manager redisplays this number of screen lines, including the contents of the input field.

If the CODE_SYSTEM runtime configuration variable is non-zero (specifying an Asian double-byte character system), the default value of REFRESH-LINES is "1". If the CODE_SYSTEM runtime configuration variable is set to "0" (indicating a single-byte ASCII or EBCDIC character system), the default value of REFRESH-LINES is "0".

17. SHADOW-STYLE=value

Determines the way window shadows are displayed:

None Shadows are not displayed.

Dim Displays a one-character border around the right and bottom edges of the window. This border keeps its current data, but displays it in low-intensity with a white foreground and a black background.

Black (default) Displays a black border on the right and bottom edges of the window. On the right edge, this border is one character wide. On the bottom edge, the border is one or one-half character high, depending on the terminal and the GM sequence (see The Terminal Database File section later in this chapter) within the terminal database file entry.

Lines Causes the right and bottom edges to be shown with a border made from the line drawing set. When the background is black, this setting is preferable to Dim or Black.

18. SIZE=value

Has meaning only on graphical systems such as Windows. It is used to change the default virtual screen size. Value is the desired number of rows and columns, separated by a comma. For example, to set the initial virtual screen size to 30 rows by 80 columns, you would make the following entry:

SCREEN    SIZE=30, 80

The default is 25 rows and 80 columns. Note that the SIZE option sets only the initial screen size.

CAUTION: If the virtual screen is too large to be fully displayed on the physical screen, users may have to scroll horizontally to see all columns.

19. WINDOW=value

Has meaning only on graphical systems such as Windows. Normally, the host determines the initial size of an application's window. You can change this initial size with the WINDOW keyword. Value is the desired number of rows and columns, separated by a comma.

For example, if you wanted your initial window to contain 10 rows and 70 columns, you would enter:

SCREEN   WINDOW=10, 70

The WINDOW configuration option has several special values that it recognizes. If either the row or column is set to a negative number, then the initial window is minimized (turned into an icon). If either value is set to "999" or larger, then the initial window is maximized instead. Finally, if either value is zero, then the initial window size is determined by the host system (the default).

The application window size may never be bigger than the virtual screen size, nor may the window size be larger than what can be physically displayed on the user's screen. The ACUCOBOL-GT runtime automatically reduces the requested window size to meet these limits.

You may enter the SIZE and WINDOW options on the same line.

For example, if you want your application to be able to use 30 lines by 80 columns, and you want to start with the window maximized (thus showing the entire virtual screen), you would enter:

SCREEN   SIZE=30, 80   WINDOW=999, 999

SIZE and WINDOW options set only the initial screen and window size. After the application begins, it may change the screen size with the DISPLAY SCREEN SIZE verb.

More:

Examples