Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
6-7
ACCEPT Statement
•
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
typeahead enables data entry for more than one field on the same line.
•
Returns only valid data to the program, determining the validity of the data from the
definitions in the Screen Section of the Data Division.
•
If invalid data is entered and an ADVISORY field is defined for the base screen,
displays an error message and redisplays the prompt for the field in error so the data
can be reentered. If no ADVISORY field is defined, it redisplays the prompt but
does not display an error message.
screen-identifier
specifies the screen fields from which data is accepted; ACCEPT statement can have
a maximum of 127 screen fields . Each screen-identifier can name an entire
screen, a screen group, or an elementary input item of any base or overlay screen
that is currently displayed. If screen-identifier is a group, all subordinate
elementary items that have a TO or USING clause in their definition are included in
the reference. Screen-identifier cannot be a subscripted item.
If data is to be accepted from fields defined for both a base screen and an overlay
screen, the screen-identifier list must include the overlay screen identifier
or the identifiers of items included in the overlay declaration. It is not sufficient to
specify the base screen without the overlay screen specification.
The order in which fields appear in the screen-identifier list is the order in
which they are checked and converted.
If this parameter is omitted, the completion condition in either the UNTIL or
ESCAPE clause determines when the statement is to terminate. No data is accepted
from the screen, and no Working-Storage item is altered.
In block mode, if a screen contains only filler items and a DISPLAY statement is
followed by an ACCEPT statement without a screen identifier, the screen remains
until a function key signals the termination of the ACCEPT statement. A typical
instance for omitting the identifier would be during the display of a help screen.
UNTIL and ESCAPE
specify the conditions under which the statement is to complete. In block mode,
these conditions are typically the names of the terminal function keys that the
ACCEPT [ screen-identifier ] ...
{ UNTIL { [(] { comp-condition-1 }... [)] ESCAPE [ ON ] } }
{ { { [(] { comp-condition-2 }... [)] } } }
{ { } }
{ { [(] { comp-condition-1 }... [)] } }
{ }
{ ESCAPE [ ON ] { [(] { comp-condition-2 }... [)] } }