COBOL Manual for TNS/E Programs (H06.03+)
Procedure Division
HP COBOL Manual for TNS/E Programs—520347-003
8-60
Simple Conditions
Usage Considerations:
•
NOT Modifier
When NOT appears, the compiler considers it and the next keyword to form a
single class condition. For example, NOT NUMERIC is a truth test that determines
if the operand is nonnumeric.
•
NUMERIC and NOT NUMERIC
You cannot use the NUMERIC and NOT NUMERIC tests with either:
°
An alphabetic data item
°
A data structure that contains any elementary item not described as USAGE
DISPLAY or whose description indicates the presence of an operational sign
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).










