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-80
Clauses in Message Description Entry
PRESENT IF MS-Bit-1-Savings
FIELD STATUS IS WS-Field-Status-Savings.
Also, it is possible to have a field other than a byte-sized one preceding a byte-sized
field. For example:
MESSAGE SECTION.
01 MS-Message.
05 Field-1 PIC 1.
05 Field-2 PIC X.
The logical length of the above message is 9 bits rather than 16 because there is no
padding between the single bit field and the following byte field. However, notice that
data communication protocols round up the physical length of the message to a full byte
boundary. The TCP receives two physical bytes, but only processes the first 9 bits.
Therefore, you need to declare the message as follows:
MESSAGE SECTION.
01 MS-Message.
05 Field-1 PIC 1.
05 Field-2 PIC X.
05 FILLER PIC 1(7).
The 7 bits needed to round up the physical length to 16 bits can be declared as FILLER
because these bits have to be declared but not processed.
Item Size
The size of a message field is determined by the symbols of its PICTURE string. The
character-string symbols DB and CR each count as two character positions. Symbols V
and P do not count as character positions. The character-string symbol 1 represents one
bit. All other symbols count as one character position.
Input Editing Rules for Numeric and Alphanumeric Data
The input editing process is different for the two classes of the input item:
1. Alphanumeric input—Only the left-hand portion of the picture corresponding to the
actual number of input characters must be matched. The remaining portion of the
picture is ignored.
2. Numeric input—Leading and trailing spaces and fill characters are first removed
from the input data string. Then an attempt is made to match each character in the
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.