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-12
ACCEPT Statement
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.
•
If a field with the ADVISORY clause is defined for the current screen, the advisory
field is displayed on the next line following the line with the error.
•
ACCEPT processing restarts after the error display operation. The prompt for the
field containing the error is redisplayed, and the cursor is positioned to accept the
correct input.
Not all errors are detected immediately. If an error is detected after subsequent screen
fields have been entered and processed, an error message is displayed and the ACCEPT
statement is restarted at the beginning. This is the same action that occurs when a
restart-input character is processed.
If no data errors are found during the checking, the following occurs:
•
The validated data from each screen field referred to is converted and moved as the
field is received from the terminal. The converted data is placed in either the TO or
USING data item in Working-Storage associated with the screen field. The
characteristics defined for a screen field such as PICTURE, UPSHIFT, and so forth,
apply to the converted value.
•
Absent screen input fields do not change the associated Working-Storage data items
unless specifically requested with the WHEN ABSENT field-characteristic clause.
•
All SHADOWED fields associated with the input fields of the ACCEPT statement
have their ENTER and RETURN bits set appropriately. If these bits are checked by
a comparison statement, the ENTER and RETURN bits should be checked together.
ACCEPT statement processing stores a condition code into the TERMINATION-
STATUS special register. A code value is assigned to each completion condition in the
same way as described previously for block mode.
The Break key for conversational terminals can be enabled to terminate an ACCEPT
operation. The Break key is enabled through the PATHCOM commands SET TERM or
SET PROGRAM TYPE in the Pathway system configuration. Also, for the Break key
to work on an ACCEPT, the SCREEN COBOL program must include an ESCAPE ON
ABORT clause in the ACCEPT statement. If the Break key is enabled and pressed