OPTIONS statement is used to modify the default display attributes and default features of the screen interaction statements (CONSTRUCT, DISPLAY, DISPLAY ARRAY, DISPLAY, FORM, ERROR, INPUT, INPUT ARRAY, MESSAGE, OPEN FORM, OPEN, WINDOW, PROMPT, REPORT, RUN, and START REPORT).
Close action |
An event handler used when the application is closed |
Character expression |
An expression that returns the name of the help file |
Sig name |
The name of a termination signal |
Function |
The name of a function called by the ON … SIGNAL clause |
Logical key |
A logical key used in 4GL (ACCEPT, QUIT, etc) |
Key |
The name of a key or a key combination you want to assign to a logical key |
Integer expression |
The identification of the refresh mode. Can be 1, 2, or 3 |
Expression |
An integer expression returning a positive integer or an expression containing keywords specifying the destination |
One program module can include several OPTIONS statements; the most recent OPTIONS statement overrides the settings of the previous ones, if they specify the same features.
If the OPTIONS statement is omitted or if a clause is not specified, the clauses of the OPTIONS statement have these default effects:
COMMENT LINE
Is used to specify the position of the comment text supplied by the COMMENT attribute of a form field.
ERROR LINE
Is used to specify the position of the message produced by the ERROR statement. By default it is the LAST line of all the 4GL windows and of the 4GL screen.
FORM LINE
Is used to specify the position of the first line of a screen form displayed in a window. By default it is the FIRST+2 (third) line of a 4GL window.
MENU LINE
Is used to specify the position of the menu. By default it is the FIRST line of a 4GL window. The line below the first MENU line which displays menu options is occupied by the menu descriptions. So MENU statement actually occupies two lines, though only the position of the first one can be defined.
MESSAGE LINE
Is used to specify the position of the message produced by the MESSAGE statement. By default it is the FIRST+1 (second) line of a 4GL window.
PROMPT LINE
Used to specify the position of the message produced by the PROMPT statement. By default it is the FIRST line of a 4GL widow.
ACCEPT KEY
Is used to specify a key that terminates the CONSTRUCT, INPUT, INPUT ARRAY, or DISPLAY ARRAY statements. By default it is ESCAPE.
DELETE KEY
Is used to specify a key used to delete a screen record when an INPUT ARRAY statement is in effect. By default it is F2.
INSERT KEY
Is used to specify a key used to insert a screen record when an INPUT ARRAY statement is in effect. By default it is F1.
NEXT KEY
Is used to specify a key used to scroll to the next page of records in an INPUT ARRAY or DISPLAY ARRAY statement. By default it is F3.
PREVIOUS KEY
Is used to specify a key used to scroll to the previous page of records in an INPUT ARRAY or DISPLAY ARRAY statement. By default it is F4.
HELP KEY
Is used to specify a key used to invoke and display help messages. By default it is CONTROL-W.
HELP FILE
This clause specifies the help file that contains help messages used in the program. It does not have a default value.
ON CLOSE APPLICATION
Is used to specify an event handler activated when an application is closed. The default event handler is STOP.
ON … SIGNAL
Is used to specify an action 4GL undertakes when the specified signal is passed by the application.
DISPLAY ATTRIBUTE
Is used to specify a set of attributes applied to the DISPLAY and DISPLAY ARRAY statements. They are overridden by the attributes specified directly in the ATTRIBUTE clauses of these statements or by the attributes in the form specification file.
INPUT ATTRIBUTE
Is used to specify a set of attributes applied to the INPUT and INPUT ARRAY statements. They are overridden by the attributes specified directly in the ATTRIBUTE clauses of these statements or by the attributes in the form specification file. If the user presses RETURN key at the last field of the form, the form is not deactivated.
INPUT WRAP
Specifies that the screen cursor will wrap from the last field of the screen array to the first one during the INPUT, INPUT ARRAY, and CONSTRUCT statements until the Accept key is pressed. If the user presses RETURN key at the last field of the form, the form is not deactivated. This is not the default value.
INPUT NO WRAP
Specifies that the screen cursor does not wrap to the first field of the form from the last one and the form is deactivated when the RETURN key is pressed. This is the default value.
FIELD ORDER CONSTRAINED
When this clause is activated the UP ARROW and DOWN ARROW keys move the cursor from the current field to the previous field and next field (respectively) during the INPUT or CONSTRUCT statements.
FIELD ORDER UNCONSTRAINED
When this clause is activated the UP ARROW and DOWN ARROW keys move the cursor to the field above and below the current field (respectively) during the INPUT or CONSTRUCT statements.
FIELD ORDER FORM
The clause makes the cursor move from field to field according to the TABINDEX form fields attribute. If the tab index of a field is set to zero, the field is excluded from the tabbing, but you can still focus on it using the mouse.
SQL INTERRUPT ON
Specifies that the user is able to interrupt SQL statements.
SQL INTERRUPT OFF
Specifies that the user is not able to interrupt SQL statements.
AUTO REFRESH
Specifies that the output of the DISPLAY statement (DISPLAY TO, DISPLAY AT, DISPLAY FORM, etc.) will be displayed immediately after the statement is executed and will not wait for the next user interaction statement.
MANUAL REFRESH
Specifies that the output of the DISPLAY statement (DISPLAY TO, DISPLAY AT, DISPLAY FORM, etc.) will be displayed not directly after the statement is executed, but after the next user interaction statement suspends the program and waits for the user input. This is the default option.