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-47
Field-Characteristic Clauses
°
If the current size exceeds the maximum size and the screen table is referenced
with a subscript, the TCP suspends the terminal and displays an error message.
°
If the current size exceeds the maximum size and the screen table is referenced
without a subscript, the TCP executes the statement as if the current size is zero.
The TCP does not, however, flag this as an error and the operation is performed
on zero items in the screen table.
The following example illustrates the OCCURS clause:
05 FLD-A AT 6, 10 PIC X(8) FROM TBL-A
OCCURS IN 4 COLUMNS OFFSET 10.
An equivalent OCCURS clause would be:
OCCURS IN 4 COLUMNS SKIPPING 2.
PICTURE Clause
The PICTURE clause defines the format in which the data appears on the terminal
screen.
character-string
can take the same form as that described in the data description entry with the
following exceptions:
•
The symbol S cannot appear in the picture.
•
Numeric edited forms and alphanumeric edited forms are allowed.
The maximum size allowed by the compiler is 255 bytes.
Generally, screen field input is edited in a manner that is inverse to normal editing
functions implied by the PICTURE clause. The input editing always correctly
reconverts a value, using the same PICTURE clause for input and output.
The input editing process is different for the two classes of the input item:
•
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.
•
Numeric input—Leading and trailing spaces and fill characters are first removed
from the input data string. If there are only spaces in the input string (this can
occur when a terminal operator simply tabs from one field to the next), the string
is considered to indicate the value 0. Otherwise 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
{ PIC } [ IS ] character-string
{ PICTURE }