View previous topic :: View next topic
|
Author |
Message |
somnath
New User
Joined: 21 Mar 2005 Posts: 18 Location: India
|
|
|
|
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 |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
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 |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
muthuvel - Question is
Quote: |
what is the advantage of using level 77? |
|
|
Back to top |
|
|
dr_te_z
New User
Joined: 08 Jun 2007 Posts: 71 Location: Zoetermeer, the Netherlands
|
|
|
|
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 |
|
|
|