Windowing Restrictions
- This feature is not guaranteed to be intermediate code compatible, so you might need to recompile your source code between product releases.
- When using the ACCEPT or DISPLAY statements with this windowing syntax, you must include the AT LINE NUMBER syntax (see your Language Reference) or items do not appear in the windows.
- You should not use cobprintf() with these DISPLAY statements.
- You should not use COPY REPLACING or REPLACE statements.
- The windowing syntax is supported only for fixed format COBOL source.
-
The following reserved words have been introduced by the windowing syntax, so you should avoid specifying them as user-defined words:
BOX BOXED CENTERED COLOR (if COLOR directive used) POP-UP SCROLLSHADOW WINDOW WRAP
- You should use only the ACCEPT and DISPLAY statements documented in your Language Reference with this windowing syntax.
- When using windowing syntax, the ANS85 Compiler directive is implied. You must not unset this directive either explicitly or implicitly.
- Alphanumeric literals must not be continued over the end of any line which includes a windowing statement.
- Some syntax errors, for example, spelling PROCEDURE DIVISION incorrectly, are flagged, but might result in spurious error messages for following source lines.
- Windowing syntax errors are serious errors, but are flagged in the form:
xnnn-P******* - The -P cob flag should not be used with windowing syntax . You should instead use "-C list".
- Column 73 must not be used within source programs which use windowing syntax, as this column is always treated as being set to a space character.
- The Compiler asks if you wish to continue after any error occurs. You can disable this function by using the NOERRQ directive. You should not, however, use the NOERRQ directive when compiling from within the Development Environment.
If no error occurred, or if an error occurred but you replied "no" to the question "do you wish to continue", the Compiler returns a zero error return code.
- Each of the following statements must appear on a line by itself:
DISPLAY WINDOW DISPLAY BOX DISPLAY LINE CLOSE WINDOW EXIT PROGRAM
- The windowing subsystem is initialized automatically upon encountering the first windowing statement.
-
If an application switches between using windowing syntax and other types of Accept/Display syntax, it must close down the windowing system completely before starting to use other types of Accept/Display syntax; otherwise the ACCEPT and DISPLAY statements may not have the desired effects.
You can create a subroutine to explicitly close the windowing system by compiling the following subprogram:
$set preprocess "window1" autoclose procedure division para-1. exit program.You then call this subprogram before switching to another type of Accept/Display syntax. The AUTOCLOSE preprocessor directive causes the EXIT PROGRAM statement to close down the windowing system before exiting the subprogram. The windowing subsystem is reinitialized upon encountering another windowing statement. Each time the windowing subsystem initializes, the background screen and contents are redisplayed.
- When a window is active, or has been active in the run unit, use of the DISPLAY SPACES UPON CRT statement clears the window to spaces but leaves attributes unchanged.