COBOL Manual for TNS and TNS/R Programs

Procedure Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
8-60
Simple Conditions
If the description of the tested item does not indicate the presence of an
operational sign, the item belongs to the numeric class only if:
°
The content of the item is numeric (consists entirely of the digit characters 0
through 9 ).
°
No operational sign is present.
If the description of the tested item indicates the presence of an operational sign,
the item belongs to the numeric class only if:
°
The content of the item is numeric (consists entirely of the digit characters 0
through 9 ).
°
The item is not described as USAGE DISPLAY, and the content of the item
consists entirely of a valid representation for the usage. If a PICTURE clause is
specified, its numeric value is within the range of values implied by the
PICTURE clause.
ALPHABETIC and NOT ALPHABETIC
You cannot use the ALPHABETIC and NOT ALPHABETIC tests with a numeric
data item. Normally, the tested item belongs to the alphabetic class only if its
content consists entirely of some combination of the alphabetic characters A
through Z, a through z, and space. When the CHARACTER-SET clause specifies
a program character set other than USASCII or UK, the set of characters that
constitute the alphabetic class is extended as appropriate (see OBJECT-
COMPUTER Paragraph).
ALPHABETIC-LOWER and NOT ALPHABETIC-LOWER
You cannot use the ALPHABETIC-LOWER and NOT ALPHABETIC-LOWER tests
with a numeric data item. The tested item belongs to the alphabetic-lower class
only if its content consists entirely of the lowercase alphabetic characters a
through z and space. When the CHARACTER-SET clause specifies a program
character set other than USASCII or UK, the set of characters that constitute the
alphabetic class is extended as appropriate (see OBJECT-COMPUTER
Paragraph).
ALPHABETIC-UPPER and NOT ALPHABETIC-UPPER
You cannot use the ALPHABETIC-UPPER and NOT ALPHABETIC-UPPER tests
with a numeric data item. The tested item belongs to the alphabetic-upper class
only if its content consists entirely of the uppercase alphabetic characters A
through Z and space. When the CHARACTER-SET clause specifies a program
character set other than USASCII or UK, the set of characters that constitute the
alphabetic class is extended as appropriate (see OBJECT-COMPUTER
Paragraph).