Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference between 01 and 77 level

Status
Not open for further replies.

solanki123

Programmer
Jul 1, 2003
29
IN
Hi all,
Using 01 level we can declare both elementry as well as group data-item.Then when do we use level 77 ?

Or I can ask the question other way--

If we want to declare elementry data-item, shall we use 77 or 01 level and why?
 
Hi,

77 is a little bit old fashioned, I see always the 01 level used. Only some programs from the 60's contain these 77 levels.

On the mainframe when you can combine the elementary items within one 01 level, you don't waste slack-bytes memory. It is common use here to define something like:

01 ELEMENTARY-FIELDS.
03 ......

Regards,

Crox
 
01 data items are guaranteed to begin in computer's word boundary, 77 aren't.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
It is not clear to me that how slack bytes can be saved used 01 level.
If 01 level data-items always start from word boundry then what is the use of synch clause.
 
A dummy 01 level is used to group all the independant elementary levels, thus eliminating the slack bytes between them. In many compilers, the 77 levels will also start on a full- or double-word boundary.

The SYNC clause specifies alignment within an 01 level.

I use 77 levels for constants when 78 levels are not available or appropriate.
 
if you put all your elementairy items under one 01 level, you don't have slackbytes within this one 01 definition unless you specify SYNC.
 
The answer to the basic question depends on which compiler you are using. SOME compilers still allocate storage for a 77-level differently than they do for an 01-level elementary item.

The statement (above) about "word boundary" is for some (not all) compilers.

To determine whether your compiler does or does not treat them the same, check your vendor's documentation. In cases where they are treated differently, then 77-levels are usually "more effecient" - but there is no requirement for this in the Standard language definition.

Bill Klein
 
Now I have got clear idea about 77 and 01 level.
Thanks to all who replied my query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top