Level numbers - cobol programming, COBOL Programming


The COBOL makes use of the level number concept to explain the hierarchical data structure.

A level number is a 2 digit number. The permitted level numbers are 01 - 49, 66, 77 and 88.

All the variables are declared in the working-storage section by using appropriate level numbers. 

The elementary data item can acquire either 01 or 77 as its level number. In the COBOL a division is made between the elementary and group data items. A few elementary data may be joint to form a group.

For illustration, the DAY, MONTH & YEAR may be 3 elementary data items. These may be joint to form a group data named DATE. The association may be shown pictorially as shown below:


2061_level number.png

It may be noted that the memory space referred to by the DATE is the combined memory space for DAY, MONTH &YEAR. The benefits of such a grouping are very clear. The programmer can now refer to the individual elementary items DAY, MONTH, YEAR or the group item DATE. An elementary data item is however the one which the programmer would always like to refer to as an entire and not in parts.

Posted Date: 10/16/2012 4:21:07 AM | Location : United States

Related Discussions:- Level numbers - cobol programming, Assignment Help, Ask Question on Level numbers - cobol programming, Get Answer, Expert's Help, Level numbers - cobol programming Discussions

Write discussion on Level numbers - cobol programming
Your posts are moderated
Related Questions
Selection of file Organization: While designing a file, the programmer should select an appropriate association for a file. The order in which the choice is to be made is as s

PROGRAM FOR MULTIPLY VERB: We have to write a simple program to elaborate MULTIPLY verb. You can also use the edit characters in the program. Identification division. Pr

CLOSE statement: The simplified syntax of the CLOSE statement is as shown below:   CLOSE          file-name-1   [WITH   LOCK   ]                         [  , file-

OCCURS - INDEXED BY PROGRAM: identification division. program- id. searching. environment division. data division. working-storage section. 01 table1.      0


PROCEDURE DIVISION statements for the indexed files: All the statements which are available for a relative file are also available for an indexed file. READ STTATEMENT :

Illustration of nested if statement: Consider the nested sentence which is as shown below: The IF-ELSE pairs in this sentence can be detected by applying the rule whic

Example of Accept statement: For illustration, ACCEPT FLAG-A can be specified to read the value of the FLAG_A from the console. It may be keep in mind that no file definition

THE SIMPLE SORT VERB: The process of sequencing the records in some preferred manner is termed as sorting. The Sorting is done upon some key data item in the record. For illus

Label Records / Disk Directory: The most important information stored in the header label is what is termed as the file title. In the situation of magnetic-disk files the labe