Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm
No new posts Syncsort TPF Level Majid Hussain SYNCSORT 2 Wed Apr 13, 2016 2:22 am
No new posts Difference Between CICS WebSupport an... sachinji84 CICS 1 Mon Mar 07, 2016 7:25 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us