Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)

Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
6-10
ACCEPT Statement
mnemonic-name-1
THROUGH
mnemonic-name-2
indicates a set of function keys as a single condition. The
mnemonic-names
must
be associated with the keys from the same range (shifted or unshifted) of function
keys; for example, F2 THROUGH F15.
Use of this option can produce unexpected results if you change function key
mapping in the SPECIAL-NAMES paragraph. With function-key remapping, you
should list the individual mnemonic names of all keys to be included in the UNTIL
and ESCAPE clauses without using the THROUGH or THRU option.
Block Mode Accept Operation
The ACCEPT statement enables the terminal keyboard and waits for input from the
terminal. When a valid control key code is received from the terminal, the keyboard is
disabled and a RESET TEMP is run automatically; this causes the removal of any
temporary field attributes or data from the display regardless of whether they were
originally displayed explicitly by the program or implicitly through the ACCEPT
statement. If termination is caused by the completion condition specified in the
ESCAPE clause, the ACCEPT statement terminates at this point.
If a prompt is used and the field named in the PROMPT clause is an output field, the
ACCEPT statement causes the current value for the output field to be displayed before
reading the data input from the terminal. An output field named in the PROMPT clause
must be defined as FILLER or defined with a FROM or USING clause.
The data entered from the terminal is checked against the requirements given for the
field by its definition in the Screen Section of the Data Division. The TCP checks only
those fields referred to by the screen-identifier list in the ACCEPT statement.
If errors are discovered and the terminal is in block mode during the data checking, the
following occurs:
If a field with the ADVISORY clause is defined for the current screen, a DISPLAY
TEMPORARY of the advisory field automatically occurs using the standard error
message for the first error detected.
If the terminal is equipped with an audible alarm, the alarm sounds provided it was
not suppressed in the SCREEN-CONTROL paragraph of the Environment
Division.
The first field in error has a temporary modification of its display attribute with the
standard error enhancement as declared in the SCREEN-CONTROL paragraph.
The program can specify that all fields in error are enhanced (see the Input-Output
Section in Section 4).
The statement is restarted following these display operations.
If no data errors are found during the checking, the following occurs: