COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
4 Data Fundamentals
Every data item in a COBOL program has a level, class and category. Data items are organized
into data structures. How data is represented depends on the machine on which it executes. Not
all data storage locations in a COBOL program are the same size. When you direct a COBOL
program to store a value of a given size at a location of a different size, the process extends or
truncates the value according to a set of alignment rules. Alignment considerations sometimes
cause the compiler to allocate unused bytes between data items, which are called implicit FILLER
data. COBOL provides several ways to refer to individual data items in a program.
Topics:
• COBOL Character Set
• Data Structures
• Data Representation
• Data Alignment in Receiving Items
• Data Alignment in Memory
• Implicit FILLER Bytes
• References to Data Items
Data Levels, Classes, and Categories
COBOL has two data levels: elementary item and data structure. An elementary item cannot be
subdivided; a data structure can be subdivided (see Data Structures).
Data items fall into the classes and categories shown in Table 15. The categories are used in
PICTURE Clause (page 191).
Table 15 Data Levels, Classes, and Categories
CategoryClassLevel of Item
AlphabeticAlphabeticElementary
NumericNumeric
Alphanumeric Alphanumeric
Alphanumeric Edited
Numeric Edited
NationalNational
PointerPointer
AlphanumericAlphanumericData structure
Data Structures
Data structures—records, files, and tables—are built from elementary items. Level-numbers show
the relationship of elementary data items to data structures.
Although the structural forms are defined within a hierarchy, independent structures of any level
are permitted. There is no requirement that all data be fully organized to the highest level.
Furthermore, multiple structures can refer to the same or overlapping physical data.
Topics:
• Level-Numbers
• Records
Data Levels, Classes, and Categories 77










