HP 3000 Manuals

Data Division [ Micro Focus COBOL Language Reference ] MPE/iX 5.0 Documentation


Micro Focus COBOL Language Reference

Data Division 

General Description 

The Data Division describes the data that the object program is to accept
as input, to manipulate, to create, or to produce as output.

Organization.   

The Data Division is subdivided into seven sections:

   1.  the File Section

   2.  Working-Storage Section

   3.  Linkage Section

   4.  Communication Section

   5.  Report Section

   6.  Screen Section (MF and XOPEN only) 

   7.  Local-Storage Section (MF only).

The File Section defines the structure of data files.  Each file is
defined by a file description entry and one or more record descriptions.
Record descriptions are written immediately following the file
description entry.

The Working-Storage Section describes records and noncontiguous data
items which are not part of external data files but are developed and
processed internally.  It also describes data items whose values are
assigned in the source program and do not change during the execution of
the object program.

The Linkage Section appears in the called program and describes data
items that are to be referred to by the calling and the called program.
Its structure is the same as the Working-Storage Section.

The Communication Section describes the data item in the source program
that will serve as the interface between the Message Control System (MCS)
and the program.

The Report Section contains one or more report description entries (RD
entries), each of which forms the complete description of a report.

For MF and XOPEN only:    The Screen Section defines the attributes of
the screens.  It offers the facility to specify the exact location of
fields when they are displayed on the screen as well as to control
certain console features during an ACCEPT or DISPLAY operation.

For MF only:    The Local-Storage Section identifies a program as
eligible for recursion.  A separate copy of the Local-Storage Section is
created each time the program is CALLed and exists only during the
lifetime of that CALL.

For MF only:    Data records and items that are described in the same way
have the same type.  The descriptions of such items can be conveniently
manupulated by declaring a type definition.  A type definition can appear
in the Working-Storage and Linkage Sections.  Atype definition in a call
prototype may be referenced in a program definition.

Structure.   

The following is the General Format of the sections in the Data Division,
and defines the order of presentation in the source program.

General Format.   

[]


MPE/iX 5.0 Documentation