Format:
CLOSE WINDOW window-save-area
Syntax Rules:
- window-save-area must be an elementary
data item described with a PIC X(10) clause. It must have been the object of a
POP-UP AREA phrase in a DISPLAY WINDOW statement.
General Rules:
- The CLOSE WINDOW statement is used to remove popup windows created by
the POP-UP AREA option of the DISPLAY WINDOW statement.
- window-save-area must have been the object
of a POP-UP phrase of a DISPLAY WINDOW statement that has been executed in this
run unit. Furthermore, since that execution, it must not have been the object
of a CLOSE WINDOW statement, nor can it have been modified by any other
statement. Violation of these rules causes undefined results.
- The CLOSE WINDOW statement restores the contents of the terminal
screen that was in the active window when the corresponding DISPLAY WINDOW
statement executed. In other words, the window that was created by that DISPLAY
WINDOW statement is removed from the screen and replaced by the contents of the
screen which were under that popup window.
- The window that was active when the corresponding DISPLAY WINDOW
statement executed becomes the active window, thereby becoming the top window
and overlaying any other windows that might be present.
Comments:
The current window is selected by closing windows identified by their respective window-save-area data items, as in the following example:
If five popup windows are created, a, b, c, d and e in that order: