Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
5-82
Clauses in Message Description Entry
Output Operations
The source is a Working-Storage Section item. The destination is a Message
Section item.
Data is retrieved from the least significant or most significant portion of the source
field, depending on whether the source field is numeric or nonnumeric.
For a Working-Storage PIC 9 field, data bits from the least significant portion of the
field are used to supply the data for the Message Section field item. There is right to
left processing of both source and destination fields, least significant to least
significant.
For a Working-Storage PIC A or X field, data bits from the most significant portion
of the field are used to supply the data for the Message Section field item. There is
left to right processing of both source and destination fields, most significant to most
significant.
Truncation rules for output operations
°
Truncation occurs when the destination is shorter than the source.
°
For Working-Storage PIC X and A fields (nonnumeric data), trailing bits are
truncated. The length of the destination Message Section item determines how
many bits are allowed. No indication of truncation is given to the application
program.
°
For Working-Storage PIC 9 and 9 COMP fields (numeric data), no loss of data
is allowed. The TCP indicates that an overflow occurred by either suspending
the requester program, or by activating ON ERROR processing.
Filling rules for output operations:
°
Filling occurs when destination is longer than source.
°
For Working-Storage PIC X fields, the TCP pads the least significant (trailing)
portion of the Message Section field with nulls (binary zeros).
°
For Working-Storage PIC 9 fields, the TCP fills the most significant (leading)
portion of the Message Section field with nulls (binary zeros).
Example
On input, if a PIC 1(9) Message Section item is placed into a PIC X(2) or PIC 9(2)
Working-Storage item, the resulting values are:
PIC X(2) bit positions: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
resulting X(2) data: x x x x x x x x x 0 0 0 0 0 0 0
PIC 9(2) bit positions: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
resulting 9(2) data: 0 0 0 0 0 0 0 x x x x x x x x x
The x represents a data bit from the Message Section item and the 0 is a binary zero fill
bit.