Was this helpful?
redisplay Statement--Refresh the Screen
This statement refreshes the screen and displays the current values of fields.
Syntax
redisplay
Description
The redisplay statement updates the screen with the current field values for all the forms that are currently displayed. Ordinarily, changes made to data in a form's fields by the program during an operation are not actually displayed on the form until all statements in the operation have been executed. The redisplay statement provides the capability to refresh the screen and display the current values at an earlier point. For example, you can use redisplay to refresh the screen immediately following a putform statement.
The statement must be within the scope of a display loop. However, it does not have to be syntactically located in the actual display block; it can be in a called routine.
The forms system avoids unnecessary refreshes of the screen. If it thinks that a refresh produces a screen that reproduces exactly what is currently on display, then it does not refresh the screen after a redisplay or resume statement. There are cases where the forms system must refresh the screen, even though it thinks a refresh is not needed; for example, when changes are made to the screen using host language write statements, because the FRS does not know about those changes.
You can force the forms system to refresh the screen by issuing a clear screen statement prior to the redisplay. Thus the following commands cause the screen to be cleared and the current form to be displayed again:
exec frs clear screen;
 exec frs redisplay;
This looks exactly like what happens when the user enters the FRS command redisplay (Ctrl-W on many terminals).
Example--redisplay statement:
Put data in the key field and refresh the screen so that the data is visible. Then, retrieve the values from a complicated query that can take some time to process.
exec frs activate menuitem 'Key';
 exec frs begin;
    exec frs clear field all;
    exec frs putform (key = :keyvar);
    exec frs redisplay;
    call exec_query(keyvar);
exec frs end;
Last modified date: 08/28/2024