COBOL 77 Level Number Uses

77 Level Number Uses, significance:77 is a special Level number in COBOL which is used to declare the Individual Elementary data items. Of course, Individual elementary data items can be declared using 01 level but 77 declared fields does not allow any sub ordinate data field declarations. These have been very useful in earlier versions of COBOL where there was a difference in storing and processing of the 77  and 01 level items. But with the latest version of COBOL, both 01 and 77 declared fields are working similarly so 77 items does not have much significance even though they are in use.

Even now a days programmers use this special Level Number 77 to declare some special kind of fields where they do not want any sub ordinate fields to be declared. Also in some organisations there are being used as part of the standards set.

Example:
77 WS-TOTAL-NUM PIC 9999.

It is not restricted for numeric, it can be used for other pictures as well.

Example:
77 WA-HEADING PIC X(10).

Notes:
Declaration should start in Area-A.
No sub items are allowed.
It should not be a part of any other item.
Can be used for all types of data items.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Bitnami