Class Condition - Control Data Corporation 3300 Reference Manual

Computer systems usasi cobol/ master
Table of Contents

Advertisement

4.3.6
CLASS CONDITION
60229400
This condition determines whether the operand is numeric, that is, consists
entirely of the characters 0, 1, 2, 3, ... , 9, with or without an operational
sign, or whether it is alphabetic, that is, consists entirely of the characters
A, B, C, , .. , Z, space.
.
. .
{NUMERIC}
IdentifIer IS (NOT]
ALPHABETIC
The operand being tested must be described, implicitly or explicitly, as
USAGE DISPLAY.
The NUMERIC test cannot be used with an item described as alphabetic.
The record description of the item being tested is determined to be numeric
only if the contents are numeric.
The ALPHABETIC test cannot be used with an item described as numeric.
The item being tested is determined to be alphabetic only if the contents
consists of any combination of alphabetic characters and the space.
If
the low-order character position of an otherwise numeric field contains a
digit with a sign overpunch, the field is determined to be totally numeric.
For a one-character alphanumeric field, that contains a numeric digit with
a sign overpunch, both the NUMERIC and ALPHABETIC tests are considered
true, and the results of the NOT option of the tests are false. An example
of the latter case follows:
02
FLD-A PIC X, VALUE 'A'
IF FLD-A NUMERIC GO TO FLD-NUM
IF F LD-A ALPHABETIC GO TO F LD-ALPHA
IF F LD-A NOT NUMERIC GO TO FLD-ALPHA
IF FLD-A NOT ALPHABETIC GO TO FLD-NUM
The first two tests will take the true path; the last two tests will take the
false path. Since 'A' in internal octal form is 21, it can be interpreted as
either an alpha A or a numeric +1.
4-11

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 3300 and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

3500

Table of Contents