Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Data Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
5-82
Clauses in Message Description Entry
picture with a character in the input data, proceeding from right to left. If no match
is made, the data is considered to be in error.
Some picture symbols are special in that the positions they represent might be omitted
from the input data string. Symbols that can be included in this category are Z,
comma, multiple plus and minus signs, CR, DB, and multiple currency signs. If a
mismatch occurs with an input character of one of these types, and if a space would be
acceptable at that point in the input string, the data is not considered in error; the
picture symbol is replaced by a space, and the editing process attempts to match the
input character with the next picture symbol.
Format Conversion Rules for PIC 1 Format (Bit Fields)
The following rules apply when data involving bit fields is passed through the Message
Section.
When a single field within the Message Section is defined as a PIC 1(n), the
processing performed is dependent on the associated Working-Storage data item type.
Input Operations
•
The source is a Message Section item. The destination is a Working-Storage
Section item.
•
For a Working-Storage PIC 9 COMP field, the data bits from the Message Section
item are placed into the least significant bit positions of the Working-Storage item.
There is high order zero fill or truncation if needed.
•
For a Working-Storage PIC 9 field, the binary numeric value is translated into the
ASCII characters that represent the decimal value of the field. If the Working-
Storage item cannot support the number, the error "value overflow" is reported and
the requester program is suspended, or an ON ERROR clause is activated.
•
For a Working-Storage PIC X field, the data bits from the Message Section item
are placed into the most significant bit positions of the Working-Storage item.
There is low order zero fill or truncation if needed.
•
For a Working-Storage PIC A field, the compiler detects and flags an error. A PIC
A field is composed of ASCII characters that must represent: A through Z, a
through z, or space.
•
Truncation rules for input operations
°
Truncation occurs when the destination is shorter than the source.
°
If the destination Working-Storage field is PIC X, trailing bits are truncated. No
indication of truncation is given to the application program.
°
If the destination Working-Storage field is PIC 9 COMP and that item cannot
support the size of the Message Section item, the following happens: the TCP
indicates that an overflow occurred by either suspending the requester
program, or by activating ON ERROR processing.










