Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Data Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
5-85
Clauses in Message Description Entry
NOT
causes the initial Boolean value for
control-field
to be complemented.
The following rules apply:
•
The PRESENT IF clause can be used only with DELIMITED messages.
Specification of PRESENT IF with other message formats will result in a syntax
error. The DELIMITED message format allows you to process variable-length
fields for the data, thus, conserving on data transmission.
•
The PRESENT IF clause can be specified at the Message Section group level or at
the field level. When the PRESENT IF clause is specified at the group level, it
causes the condition to be propagated to the fields that belong to this group.
These fields can still specify their own PRESENT IF condition. The group level
PRESENT IF condition is overridden by the field level PRESENT IF condition.
•
PRESENT IF clause processing is the same for input and output operations.
•
PRESENT IF clauses can be logically nested to any depth. When PRESENT IF
clauses are nested, an optionally present field is present only if a second optionally
present field is present; the second optionally present field is present only if a third
optionally present field is present, and so forth.
•
The first level has to be present before you can use the second level, the second
level has to be present before you can use the third level, and so forth.
•
To conveniently determine if a conditionally present field is present, specify a
FIELD STATUS clause on the field. You can test the shadow data item in the
FIELD STATUS structure to determine the presence of the field. For details, see
the FIELD STATUS clause.
•
An alternative, although less desirable, method of testing for the presence of a field
is to make explicit reference to the Boolean values of the Working-Storage data
item associated with the control-field parameter in the PRESENT IF clause.
•
You must use caution when setting up the data structures to use the PRESENT IF
clause with the DELIMITED message format. It is possible for one data field to be
substituted for another in an input message without any possibility of detection of
the unintended substitution by the TCP.
The following example shows where such a substitution could take place.
WORKING-STORAGE SECTION.
01 WS-MSG.
02 WS-PIF-1 PIC 9(1) COMP.
02 WS-PIF-2 PIC 9(1) COMP.
02 WS-F1 PIC X(8).
02 WS-F2 PIC X(8).
MESSAGE SECTION.
01 MSG MESSAGE FORMAT IS DELIMITED
FIELD-DELIMITER IS OFF.
02 PIF-1 PIC 1(1) TO WS-PIF-1.










