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

Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
6-9
ACCEPT Statement
INPUT
indicates that the ACCEPT statement terminates with valid screen input. This
phrase is effective only for terminals in conversational mode.
If the terminal is in block mode, INPUT is treated as a comment.
TIMEOUT timeout-value
specifies a time limit in seconds that the terminal operator has to complete the
data entry. The
timeout-value
can be a numeric literal or a numeric data
item; valid values are 0 through 32,767 seconds. If the operator does not
respond in the specified number of seconds, TERMINATION-SUBSTATUS is
set to 40, and the ACCEPT operation is cancelled. TIMEOUT can appear only
in the ESCAPE clause. The maximum timeout value is the largest value that
will fit in a 32-bit field.
If this phrase is not specified, there is no time limit.
Use of the PW-QUEUE-FKEY-TIMEOUT special register allows locking the
keyboard before processing the TIMEOUT logic. For further information see
Special Registers on page 5-95..
UNSOLICITED [ MESSAGE ]
indicates that the ACCEPT statement is to be aborted on the arrival of an
unsolicited message. You detect the receipt of an unsolicited message by
checking for the appropriate condition code value in TERMINATION-STATUS
following completion of the ACCEPT statement. UNSOLICITED MESSAGE
can appear only in the ESCAPE clause.
Use of the PW-QUEUE-FKEY-UMP special register allows locking the
keyboard before processing the unsolicited message logic. For further
information see Special Registers on page 5-95.
mnemonic-name
indicates the ACCEPT operation completes when the terminal operator presses
the associated function key. This assumes
mnemonic-name
has been associated
with a terminal function key; the association is specified by an IS phrase in the
SPECIAL-NAMES paragraph of the Environment Division. Because of terminal
characteristics, certain keys can be used only in the ESCAPE clause. Table 4 - 1
lists the system names of function keys that can be used only in the ESCAPE
clause.
Note. Do not use enclosing parentheses for a function key range following a TIMEOUT clause
if a Working-Storage item is used for the TIMEOUT value and the item is not indexed; if you
include the parentheses, a SCREEN COBOL compiler error occurs.
Note. In conversational mode, all comp-condition phrases except ABORT, INPUT, TIMEOUT,
and UNSOLICITED MESSAGE are ignored.