Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
6-7
ACCEPT Statement
•
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 enhances the field in error so the data can be
corrected or reentered.
If the terminal associated with the SCREEN COBOL program is operating in
conversational mode, ACCEPT 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 response from the terminal. If the TIMEOUT phrase is used, ACCEPT
waits the time limit 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
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
ACCEPT [
screen-identifier
] ...
{ UNTIL { [(] {
comp-condition-1
}... [)] ESCAPE [ ON ] } }
{ { { [(] {
comp-condition-2
}... [)] } } }
{ { } }
{ { [(] {
comp-condition-1
}... [)] } }
{ }
{ ESCAPE [ ON ] { [(] {
comp-condition-2
}... [)] } }










