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-79
Clauses in Message Description Entry
The PIC 1 format allows you to process fields of 1 bit in length or to process data in
encoding schemes that require character lengths other than 1 byte. For example, packed
decimal or binary coded decimal (BCD) require character lengths of 4 or 6 bits
respectively. Here are some examples of the PIC 1 format:
PIC 1. single binary digit (1-bit field)
PIC 1(6). 6 bits together (BCD character)
PIC 1(8). 8 bits together (1-byte field)
PIC 1(64). 64 bits (8 bytes) to form a single field
This format gives you the capability to decompose a message data stream on a bit-by-bit
basis. This capability is useful when processing bit maps within a message.
The PIC 1 field specification raises the issue of data alignment to byte boundaries
because it is now possible to define fields that are not exact multiples of full bytes.
When using the PIC 1 format, it is recommended that the Message Section maintain a
byte-oriented structure. For example:
MESSAGE SECTION.
01 MS-ATM-Record
05 MS-Bit-Map.
10 MS-Bit-1-Savings PIC 1(1)
USING WS-Bit-1.
10 MS-Bit-2-Checking PIC 1(1)
USING WS-Bit-2.
10 MS-Bit-3-Credit-Card PIC 1(1)
USING WS-Bit-3.
10 FILLER PIC 1(5).
05 MS-Savings.
10 Savings-Data PIC X(15)
TO WS-Savings-Data
- Represents a position where either a space or a minus sign must appear. Multiple
minus signs represent positions that must contain some number of digits preceded
by an optional minus sign, preceded by spaces. The symbol is replaced by a
space during editing only when it is one of a set of multiple minus signs.
CR Represents two positions that must contain the characters CR or spaces. These
symbols are replaced by spaces during editing if the value is not negative.
DB Represents two positions that must contain the characters DB or spaces. These
symbols are replaced by spaces during editing if the value is not negative.
* Represents a position that must be a digit or an asterisk. If the position is a digit,
the digit must be to the left of all asterisks.
$ Represents a position where a currency symbol must appear. Multiple currency
symbols represent positions that must contain some number of digits preceded by
a currency symbol, preceded by spaces. The symbol is replaced by a space
during editing only when it is one of a set of multiple currency symbols.
Table 5-12. Message Description Entry PICTURE Character-String
Symbols (page 2 of 2)
Symbol Meaning