Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
5-68
Clauses in Message Description Entry
The field error data item allows the TCP to report specific edit errors that relate to the
specified Message Section field. The following discussion on error processing tells you
how to process the field error data item.
Use the ON ERROR clause to detect any error that occurs on input or output of the
message from Working-Storage. Use the FIELD STATUS clause to detect specific edit
errors.
If an error is detected on either an input or output operation, the ON ERROR path is
taken. The processing of the ON ERROR clause for RECEIVE UNSOLICITED
MESSAGE, REPLY TO UNSOLICITED MESSAGE, SEND MESSAGE, and
TRANSFORM is the same as that for the CALL and SEND statements.
As part of the ON ERROR processing you need to check for a TERMINATION-
STATUS of 5 or 15 to determine if any edit errors have occurred (5 indicates input phase
and 15 indicates output phase). If TERMINATION-STATUS is 5 or 15, you can then
process the FIELD STATUS field error data item to determine which field or fields had
edit errors.
The process of deciding which message template the FIELD STATUS data item belongs
to differs for the input message and the output message.
For input messages, you need to know which of the message templates of the YIELDS
list you were processing when the error(s) occurred.
The relative position of the YIELDS list is returned in TERMINATION-SUBSTATUS.
The position is returned in TERMINATION-SUBSTATUS instead of TERMINATION-
STATUS because this is the ON ERROR case. At this point TERMINATION-STATUS
holds the error number. If this were the normal case, not ON ERROR, TERMINATION
STATUS would be used to define the relative position in the YIELDS list.
Table 5-10. Relationship Between Selected State and PRESENT IF
PRESENT IF and FIELD STATUS Values Meaning TCP Action
PRESENT IF data-item 1 Field Present Output Field
FIELD STATUS shadow-data-
item
1 Select Field for Output
PRESENT IF data-item 0 Field Absent Output Field
FIELD STATUS shadow-data-
item
1 Select Field for Output
PRESENT IF data-item 1 Field Present Output Field
FIELD STATUS shadow-data-
item
0 Selected State Has No
Meaning
PRESENT IF data-item 0 Field Absent Does Not
Output Field
FIELD STATUS shadow-data-
item
0 Selected State Has No
Meaning