Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
6-61
DISPLAY BASE Statement
•
One of the following statements is run: ACCEPT; BEGIN-TRANSACTION, END-
TRANSACTION, RESTART-TRANSACTION, or ABORT-TRANSACTION; CALL;
CHECKPOINT; DELAY; EXIT PROGRAM; PRINT SCREEN; or SEND
•
The DISPLAY statement is run for a conversational terminal
During execution of the first DISPLAY BASE statement for a SCREEN COBOL
program, the I/O startup messages prepare the terminal for Pathway/iTS operation.
The program can then act on any terminal I/O errors through the CALL ON ERROR
clause.
For the DISPLAY BASE statement in block mode, the input and output fields of the
screen are filled with the values specified in the VALUE clauses for the fields (unless
the DYNAMIC modifier is used and the field’s SELECT bits are set to 1, in which case
the values are taken from the associated Working-Storage data items). A field that has
no VALUE clause is filled with the fill character. For variable-length tables (defined
with OCCURS DEPENDING ON), the table is filled to the maximum length possible as
specified in the definition, regardless of the current value of the table's controlling
variable.
Using DISPLAY BASE
A running SCREEN COBOL program has at most one current base screen; the
current base screen is defined by the most recently run DISPLAY BASE statement.
The program can have at most one current overlay screen associated with each of the
overlay areas of the current base screen; the current overlay screen is defined by the
most recently run DISPLAY OVERLAY statement for each of the areas. With the
exception of the DISPLAY BASE and DISPLAY OVERLAY statements, all screen
operations must deal only with the current screens.
The definition of a screen is local to a SCREEN COBOL program; therefore, a program
cannot use a current screen that was established by another program, even if the
declaration of the current screen is identical to the declaration of the screen in the
currently executing program. Consequently, the program must perform a DISPLAY
BASE operation to use a screen.
If a program has current screens defined and calls another program that has screen
declarations, the current screens become undefined for the first program. If the first
program is to make use of the screens it previously displayed, the first program must
run DISPLAY BASE/OVERLAY statements after the call to the program has
completed.
If a program calls another program that has no screen declarations or does not exist,
the definitions of the current screens remain unchanged.
When a program that has defined the current screens runs an EXIT PROGRAM
statement, the current screens become undefined. The program must display the
screens again to make use of them even if no intervening screen operations have
occurred since its exit.










