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

Data Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
5-93
Clauses in Message Description Entry
USING
specifies that data is to be moved either from the message field to the
data-name-1
data area or from the
data-name-1
data area to the message
field, or both.
A field can be described with both a TO and a FROM clause. If you specify both
clauses, each can have a different data name. The particular clause determines the
general type of the field (input, output, or input-output) as indicated in Table 5 -13.
Assume the following Working-Storage and Message Sections:
WORKING-STORAGE SECTION.
01 W-FLD1 PIC X(2).
01 W-FLD2 PIC X(2).
01 W-FLD3 PIC 9(18) COMP.
01 W-FLD4 PIC X(4).
MESSAGE SECTION.
01 MSG1 PIC X(2) TO W-FLD1.
01 MSG2 PIC X(5) FROM W-FLD2 MESSAGE FORMAT IS VARYING1.
01 MSG3 PIC X(8) USING W-FLD3 MESSAGE FORMAT IS VARYING2.
01 MSG4 PIC X(4) FROM W-FLD1 TO W-FLD4
MESSAGE FORMAT IS VARYING1.
Notice that W-FLD3 contains eight characters, the amount required by a COMP field
whose size is between 9(10) and 9(18).
1. The fixed format field MSG1 receives a message containing the two characters
AB. These characters are then passed to W-FLD1:
Table 5-13. Association Clauses and Message-Field Types
Association Clause Message-Field Type
TO clause only Input
FROM clause only Output
USING clause Input-Output
TO and FROM clause Input-Output
013CDT .CDD
MSG1 W-FLD1
AB AB
,