COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
CLASS Clause
The CLASS clause defines classes other than the NUMERIC, ALPHABETIC, ALPHABETIC-UPPER,
and ALPHABETIC-LOWER that the COBOL language defines.
class-name
is referenced in the program as a class-condition (see Class Conditions (page 269)).
literal-phrase
specifies a string of characters (literal-1 ) or a range of characters (literal-1 through
literal-2 ) that make up the class you are defining.
literal-1
is an unsigned integer literal or a nonnumeric literal, but not a symbolic-character figurative
constant.
If literal-1 is an unsigned integer literal, its value must be in the range 1 through 256.
The value is the ordinal number of a character position in the computer’s character set (the
first character has ordinal number 1, even though its representation is octal 00).
If literal-1 is a nonnumeric literal, its value depends on the presence or absence of
literal-2. If literal-2 is present, the value of literal-1 must be exactly one
character, and it can be a character that is either before or after literal-2 in the ASCII
collating sequence. If literal-2 is absent, the value of literal-1 can be a string of
one or more characters. The compiler handles a multicharacter string as an abbreviation
for a consecutive series of literal phrases that identify each of the single characters
individually, in the order they appear in literal-1.
literal-2
is an unsigned integer literal or a nonnumeric literal, but not a symbolic-character figurative
constant.
If literal-2 is an unsigned integer literal, its value must be in the range 1 through 256.
The value is the ordinal number of a character position in the ASCII character set.
If literal-2 is a nonnumeric literal, its value must be exactly one character.
The compiler handles the range literal-1 through literal-2 as an abbreviation for
a consecutive series of literal phrases that specify all ASCII characters from the lower ordinal
position to the higher ordinal position.
The two definitions in Example 26 are equivalent.
Example 26 Defining a Class of Vowels
CLASS VOWEL IS "A" "E" "I" "O" "U" "a" "e" "i" "o" "u"
CLASS VOWEL "AEIOUaeiou"
The two definitions in Example 27 are equivalent.
Configuration Section 113










