Example of Level numbers - cobol programming:
To explain the hierarchical structure introduced above, the concept of the level number is employed in COBOL.
The most broad group should have the level number 01. The initial subdivisions can have any level number between 02 and 49. More subdivisions must follow the similar range with the restriction that an item cannot have a level number less than or equal to the level numbers of the group which may include it. However a group involves all the elementary data or smaller groups beneath it until a level number equal to or less than the level number of the said group is encountered. The illustrations reveal the concept of the level numbers.
The group DATE that was shown former in the pictorial form is described in the first illustration. In the second illustration PAY is the most comprehensive group that has three subdivisions, namely, the GROSS-PAY, DEDUCTIONS &NET-PAY. The GROSS-PAY is again subdivided into BASIC, DEARNESS & HOUSE-RENT. In similar way the deductions are further subdivided into the PF-DEDUCT and IT-DEDUCT. It may be noted that the elementary data items are BASIC, DEARNESS, HOUSE-RENT, PF-DEDUCT, and IT-DEDUCT & NET-PAY. The structure can be pictorially shown below:
Many times, in a hierarchical data structure like this, the programmer may not need a data item to be referred to in the PROCEDURE DIVISION. This situation usually arises when a group and only few of its subdivisions are to be used in the program. The remaining subdivisions do not require to be used explicitly. In such cases the word FILLER may be used to name data to which the programmer does not wish to assign a specific name. FILLER can be used as many times as needed.