|
ELEMENTARY GROUP DATA ITEMS
ELEMENTARY GROUP DATA ITEMS
An elementary data item is a data item which does not have any subordinate
items and it has PICTURE clause. A data item which has subordinate items
is called Group Item. Group Item are defined using level numbers ( 01 to
49 ). Below picture explain, difference between elementary item and group
item.
Elementary data items can be defined with any of the level numbers 01 – 49, 77.
To represent relation between group and elementary items, level numbers are
used in COBOL. Available level number are 01 to 49. Below example shows,
how we can define a group item for record shown in previous page.
Till now, we have seen how we can define elementary data items and group data
items. Where we need to code these data items? We need to code these group
and elementary items either in FILE SECTION ( if we are using files in the
program) or in WORKING-STORAGE SECTION.
Data items defined in FILE SECTION & WORKING-STORAGE SECTION can be used in
PROCEDURE DIVISION program logic.
|
|