View previous topic :: View next topic
|
Author |
Message |
Yogesh_agarwal
New User
Joined: 15 Feb 2006 Posts: 5 Location: Noida
|
|
|
|
Hi all,
We can use level number 01 and 77 both for elementary item.but why it is always recommended to use 77 instead of 01.
Thx in advance
Yogesh |
|
Back to top |
|
|
Nirmala
New User
Joined: 13 Feb 2006 Posts: 3
|
|
|
|
Hi,
Any item declared in Level 01 will have Duble Word boundary set by the system .. which will occupy more space.
Regards
Nirmala |
|
Back to top |
|
|
nuthan
Active User
Joined: 26 Sep 2005 Posts: 146 Location: Bangalore
|
|
|
|
Hai,
If u mentioned as 01 item, in future it can be sub grouped. But if u mentioned as 77 item it will be remained as elementary item only. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
Back to top |
|
|
Yogesh_agarwal
New User
Joined: 15 Feb 2006 Posts: 5 Location: Noida
|
|
|
|
Hi,
Thanks a lot to all of you. |
|
Back to top |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
Earlier versions of COBOL had a difference in the way the data was stored/accessed when you use a 77 and 01 level.
77 level was boundary aligned and 01 level was not boundary aligned .
Boundary alignment used to dictate the number of bytes used for actual storage, addressability and fetching.
The minimum fetch unit used to be a word and so even if your character size is less than a word all the bytes in the word would be used for storing the value. There was no impact on the fetch time for the character variables .
In addition to the storage , when the declaration is for numeric values and if the numeric values are used in any kind of intensive computation , the declaration types would have an impact on the CPU time if they were declared at 01 level because of the non-alignment .
In MVS COBOL and VS COBOL II 01 level variables are also boundary aligned and have been hence there is no difference .
Let me know if i am wrong. |
|
Back to top |
|
|
|