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-66
Clauses in Message Description Entry
Shadow Data Item
When you use the FIELD STATUS clause with the PRESENT IF clause, you can test
the shadow portion of the FIELD STATUS Working-Storage group item to determine if
a conditionally present field is present.
You interpret the shadow data item based on the values it can assume. Those values
depend on two factors: the state of the conditionally present field and whether the data
is being input or output.
•
Entered state—The field was received on input and was present in the data stream.
•
Stored state—The field that was entered or generated was placed in the designated
Working-Storage or Linkage Section data item.
•
Selected state—The field should be selected for output from the designated
Working-Storage or Linkage Section data item.
The entered and stored states reflect what happens during input processing. The TCP
updates the value of the shadow item to reflect the entered or stored state.
The selected state only has effect during output processing. The selected state is under
the control of the SCREEN COBOL program. Once the program sets the selected state,
that state remains in effect until reset by the program.
During input processing, the TCP always updates the value of the shadow item to reflect
the entered or stored state. This allows you to get the exact status of the last input
operation for a field. This shadow information is important when you are processing
conditionally present fields.
An input shadow data item can assume the value of 2, 3, 4, 5, 6 or 7.
•
Shadow field = 2—A field has been entered (is present) but failed an edit operation;
it is not stored.
•
Shadow field = 4—A field has been stored but was not physically entered.
The TCP generated the pad data to store in this field.
•
Shadow field = 6—A field has been entered, has passed the edit phase,
and has been stored.
In addition, the values that a shadow data item can assume after an input operation are
offset by the setting of the selected state. Table 5-9
shows the possible states and the
actual values of the shadow data item if the selected state is 0 or the selected state is 1.