Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
6-65
DISPLAY Statement
05 screen-fld1 at 4, 20
PIC X(10)
from fld1.
05 screen-fld2 at 5, 40
PIC X(10)
from fld2.
05 screen-fld3 at 6, 60
PIC X(10)
from fld3.
PROCEDURE DIVISION.
:
BODY-PARAGRAPH.
:
DISPLAY BASE MENU1.
DISPLAY SCREEN-FLD1,
SCREEN-FLD2,
SCREEN-FLD3,
DEPENDING ON WS-SCREEN-STATUS.
If WS-SCREEN-STATUS equals 1, SCREEN-FLD1 is displayed. If WS-SCREEN-
STATUS equals 2, SCREEN-FLD2 is displayed, and so on. It is not considered
erroneous if WS-SCREEN-STATUS < 1 or WS-SCREEN-STATUS > 3. Control just
falls through (execution continues with the next statement) and no screen field is
displayed.
The execution of DISPLAY in block mode does not cause a physical write to the
screen but causes data to be written to the terminal buffer. A physical write to the
screen occurs when one of the following events occurs:
•
Terminal buffer (TERMBUF) fills up
•
Execution of one of the following statements: ACCEPT; BEGIN-TRANSACTION,
END-TRANSACTION, RESTART-TRANSACTION, or ABORT-TRANSACTION;
CALL; CHECKPOINT; DELAY; EXIT PROGRAM; PRINT SCREEN; or SEND
•
Execution of DISPLAY for a conversational terminal
For terminals operating in conversational mode, the DISPLAY statement presents
output in order by rows. A screen field value appears on the screen at the column
number position specified in the screen field description. Blank lines are not generated
(for formatting purposes), so screen lines generally do not correspond with the line
numbers specified in the Screen Section.
To display fully line-formatted screens, define at least one item for every line (row) of
the screen. If a row of spacing is required, define the screen item for that row with a
VALUE clause specifying blanks; for example, VALUE " ". Then, prepare the entire
screen buffer by specifying the screen name as the screen identifier in the DISPLAY
statement.
For terminals operating in conversational mode, the DISPLAY statement performs as
follows:










