Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Difference between level 01 and level 77.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
somnath

New User


Joined: 21 Mar 2005
Posts: 18
Location: India

PostPosted: Thu Jul 05, 2007 10:52 am    Post subject: Difference between level 01 and level 77.
Reply with quote

I have a query regarding level 01 and 77.
Both can represent elementary data. So what is the advantage of using level 77?

Thanks in Advance,
Somnath
Back to top
View user's profile Send private message

muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Thu Jul 05, 2007 11:04 am    Post subject: Re: Difference between level 01 and level 77.
Reply with quote

Code:
Both can represent elementary data.


The above is true but 77 level can represent only elementary data.The element in 77 cannot be subdivided or cannot have a group of subelements .This is to indicate the variable declared in 77 is an elementary(some thing for special purpose) and should not be subdivided .

Level 01 can be elementary item or a part of a group item.

Code:
01 ws-a.
   02 ws-b pic x(02).
   02 ws-c pic x(03).

the above code is possible.
Code:
77 ws-a.
   02 ws-b pic x(02).
   02 ws-c pic x(03).


the above code is not possible.


hope this help
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu Jul 05, 2007 11:21 am    Post subject:
Reply with quote

muthuvel - Question is
Quote:
what is the advantage of using level 77?
Back to top
View user's profile Send private message
dr_te_z

New User


Joined: 08 Jun 2007
Posts: 71
Location: Zoetermeer, the Netherlands

PostPosted: Thu Jul 05, 2007 11:22 am    Post subject: Re: Difference between level 01 and level 77.
Reply with quote

somnath wrote:
what is the advantage of using level 77?

the address. a 77 level field always starts at a "full word boundery". e.g.
Code:

01  foo.
    03 filler  pic X value space.
    03 count-a pic s9(9) binary value zero.
77  count-b     pic s9(9) binary value zero.

add 1 to count-a.
add 1 to count-b.
count-a does not start at a full-word boundery, count-b does. In theory the 2nd ADD generates more efficient code (less instructions) than the 1st.

If it can be measured..... dunno never tried.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us