Pathway/iTS TCP and Terminal Programming Guide

Programming for Specific Terminals
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
3-16
Displaying Information
Displaying Information
The DISPLAY BASE statement establishes the current screen.
A DISPLAY statement in conversational mode causes the TCP to write to the terminal
display, which can be a screen, printer paper, and so forth.
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 for formatting purposes are not generated. Therefore, 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, display the entire
screen by specifying the screen name as the screen identifier in the DISPLAY statement.
For more information, see the descriptions of the DISPLAY BASE and DISPLAY
statements in the Compaq NonStopPathway/iTS SCREEN COBOL Reference
Manual.
Accepting Information
If the terminal associated with the SCREEN COBOL program is operating in
conversational mode, the ACCEPT statement performs the following:
Displays the prompt value defined for the first screen field described with a
PROMPT clause. The prompt value is always displayed in the first column of the
screen line.
Waits for a response from the terminal. If the TIMEOUT phrase is used, ACCEPT
waits the length of time specified in this phrase.
Receives input from the terminal and stores the data into the associated working-
storage items of the program data area. Input can be accepted from the terminal one
screen field at a time, one field per line. However, the capability referred to as type
ahead enables data entry for more than one field on the same line.
Returns only valid data to the program (checking the definitions in the Screen
Section of the Data Division to determine the validity of the data). All
SHADOWED fields associated with the input fields of the ACCEPT statement have
their ENTERED and RETURNED bits set appropriately.
If invalid data is entered and an ADVISORY field is defined, an error message is
displayed, the prompt is redisplayed for the field in error, and the data can be reentered.
If an ADVISORY field is not defined for the base screen, only the prompt is redisplayed
for the field in error and the data can be reentered.
For more information, see the description of the ACCEPT statement in the Compaq
NonStopPathway/iTS SCREEN COBOL Reference Manual.