Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
6-12
ACCEPT Statement
DEPENDING ON TERMINATION-STATUS.
GO TO get-oper-input.
Conversational Mode Accept Operation
The ACCEPT statement displays the prompt value for the first screen field described
with a PROMPT clause, enables the keyboard, and waits for data to be entered from
the terminal. (If no screen field description contains a PROMPT clause, the ACCEPT
statement begins at the first column of the screen.) If termination is caused by a
completion condition specified in the ESCAPE clause, the ACCEPT statement
terminates at this point with no changes to the Working-Storage data items. The
ACCEPT statement always displays the prompt value in the first column of the screen
line and positions the cursor at the end of the prompt field regardless of the positions
specified for the field in the screen description.
When the terminal is enabled for input, data can be accepted for each input field a line
at a time or accepted for more than one field on the same line. If the typeahead
capability is used, field or group separators delimit the screen fields such that multiple
fields of data are accepted in a single buffer. When typeahead is used, only the
prompt value for the first field is displayed. Then, no other prompts appear until the
end of the input is indicated by either a carriage return or an input-control character.
The ACCEPT statement processes input data in the order the data is received from the
terminal. The input data is associated with the screen fields in the sequence the fields
are defined in the Screen Section. The data is accepted until there is no more input,
the abort-input character is entered, or an error is detected. The sequence in which
the screen identifiers are processed is from top to bottom and from left to right as
follows:
1. The screen field with a lower row (line) number is processed before a screen field
with a higher row number.
2. Within the same row, the screen field with a lower column number is processed
before a screen field with a higher column number.
The input data is checked against the requirements given for a field by the
field definition in the Screen Section. Only those fields referred to by the
screen-identifier list are checked. During ACCEPT statement processing, the input
data is scanned for input-control characters that identify the input fields and indicate an
abort, end-of-input, or restart operation. Mnemonic names (except BELL and
HIDDEN) are not recognized in conversational mode; therefore, function keys have no
effect.
A field error affects only the data in the field that contains the error; fields containing
data entered before the error was detected remain valid. Fields containing data
entered after the error was detected are ignored.
If an error is discovered during the data checking, the following occurs:
•
Only the first field having an error is detected and enhanced. The BELL attribute is
the only recognized error enhancement in conversational mode.










