Ch 4. Describing and Referencing Data [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation
HP COBOL II/XL Reference Manual
Chapter 4 Describing and Referencing Data
The data used by a COBOL program is defined and described in the DATA
DIVISION, and referenced and operated upon in the PROCEDURE DIVISION.
This data is stored in, read from, and written to files (collections of
information) that reside on various peripheral devices. For instance, a
payroll processing program might accept input from a file that contains
wage and salary information for all employees on the company payroll;
this program might also write new output to this same file during
updating operations.
Within a file, all information is organized into units of related data
called logical records. These records are similar in form, purpose, and
content. For example, in a payroll file, each logical record could
contain the wage and salary data related to a particular employee. In
other words, there would be one record for each employee.
Within each record, individual elements of data, or groups of such
elements, are called data items. As an example, a payroll record for an
employee might contain the following data items: the employee's name,
social security number, marital status, gross pay, tax exemptions,
individual deductions, and net pay. The individual deductions data item
might itself contain subordinate data items, such as federal income tax,
state income tax, insurance premiums, bond payments, and charity
contributions.
MPE/iX 5.0 Documentation