Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Data Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
5-43
Field-Characteristic Clauses
The literals used in this clause must match for the screen field and the associated data
item, or an error is generated. For example, if a screen field receives alphanumeric
character data, that data must go into a data item that is defined with a nonnumeric
PICTURE clause. Numeric items are compared numerically; alphanumeric items are
compared left to right according to the ASCII character set. For example, an input
string 9 is less than 10 if the screen PICTURE clause is numeric. An input string "9" is
greater than "10" if the screen PICTURE clause is nonnumeric.
When the MUST BE clause is processed, a numeric literal is scaled to match the
PICTURE clause defined for the associated data item. For example, if you have a
PICTURE clause of PIC 999.99 in the Screen Section data item and a MUST BE
clause of MUST BE 100, the MUST BE clause is scaled to MUST BE 100.00. You do
not have to include the decimal places in the MUST BE clause unless you want to
specify the value to two decimal places.
The MUST BE clause by itself does not make a screen field required. For a field to be
required, three clauses are necessary:
•
LENGTH clause—specifies that a length greater than zero is required (This clause
must be specified for the TCP to verify the MUST BE clause.)
•
MUST BE clause—specifies acceptable values if the field is present
•
MDTON (Modified Data Tag On) attribute—specifies data validation even if the field
is unchanged
You can use the THROUGH/THRU clause with level 88 data items associated with
double-byte character-set literals. Byte-by-byte comparisons of all items in the
THROUGH/THRU clause are performed. Double-byte character set data used in the
THROUGH/THRU clause is treated as a byte string.
OCCURS Clause
The OCCURS clause specifies multiple occurrences of screen fields. This clause can
define a column, a row, or a rectangular array of fields. Each occurrence of the field is
identical except for location, and each is associated with a particular occurrence of a
Working-Storage data item having an OCCURS clause.
OCCURS {
lines-phrase
[
columns-phrase
] }
{
columns-phrase
[
lines-phrase
] }
[ DEPENDING [ ON ]
data-name-1
]










