Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Validating data

If you suspect that your program is trying to perform arithmetic on nonnumeric data or is receiving the wrong type of data on an input record, use the class test (the class condition) to validate the type of data.

You can use the class test to check whether the content of a data item is ALPHABETIC, ALPHABETIC-LOWER, ALPHABETIC-UPPER, DBCS, KANJI, or NUMERIC. If the data item is described implicitly or explicitly as USAGE NATIONAL, the class test checks the national character representation of the characters associated with the specified character class.

related tasks
Coding conditional expressions
Testing for valid DBCS characters

related references
Class condition (COBOL for Windows Language Reference)


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)