CLASS clause

The CLASS clause provides a means for relating a name to the specified set of characters listed in that clause.

CLASS class-name-1 IS
Provides a means for relating a name to the specified set of characters listed in that clause. class-name-1 can be referenced only in a class condition. The characters specified by the values of the literals in this clause define the exclusive set of characters of which this class consists.

The class-name in the CLASS clause can be a DBCS user-defined word.

literal-4, literal-5
Must be category numeric or alphanumeric, and both must be of the same category.

If numeric, literal-4 and literal-5 must be unsigned integers and must have a value that is greater than or equal to 1 and less than or equal to the number of characters in the alphabet specified. Each number corresponds to the ordinal position of each character in the single-byte EBCDIC or ASCII collating sequence.

If alphanumeric, literal-4 and literal-5 are an actual single-byte EBCDIC character.

literal-4 and literal-5 must not specify a symbolic-character figurative constant. If the value of the alphanumeric literal contains multiple characters, each character in the literal is included in the set of characters identified by class-name.

Floating-point literals cannot be used in the CLASS clause.

If the alphanumeric literal is associated with a THROUGH phrase, the literal must be one character in length.

THROUGH, THRU
THROUGH and THRU are equivalent. If THROUGH is specified, class-name includes those characters that begin with the value of literal-4 and that end with the value of literal-5. In addition, the characters specified by a THROUGH phrase can be in either ascending or descending order.