Most data used in a COBOL program can be divided into classes and categories, except pointers, procedure-pointers, and index data items. Every elementary item in a program belongs to one of the classes as well as one of the categories. Every group item belongs to the alphanumeric class even if the subordinate elementary items belong to another class and category. Table 1 shows the relationship of data classes and categories.
The data category of an item is determined by its PICTURE character-string, BLANK WHEN ZERO, and USAGE attribute. For details, see Data Categories and PICTURE Rules.
The data category of an item can also be determined by its FORMAT clause. A FORMAT clause defines category date, time, and timestamp items.
Boolean data is an IBM extension that provides a means of modifying and passing the values of the indicators associated with the display screen formats and externally described printer files. A Boolean value of 0 is the off status of the indicator, and a Boolean value of 1 is the on status of the indicator.
A Boolean literal contains a single 0 or 1, is enclosed in quotation marks, and is immediately preceded by an identifying B. A Boolean literal is defined as either B"0" or B"1".
A Boolean character occupies one byte.
When the figurative constant ZERO is associated with a Boolean data item or a Boolean literal, it represents the Boolean literal B"0".
The reserved word ALL is valid with a Boolean literal.
Every data item that is an intrinsic function is an elementary item, and belongs to the category alphanumeric, numeric, DBCS, national, boolean, date, time, or timestamp and to the corresponding class; the category of each intrinsic function is determined by the definition of the function.