View previous topic :: View next topic
|
Author |
Message |
etijain
New User
Joined: 26 Nov 2005 Posts: 2
|
|
|
|
hi...i have heard that 01 level in cobol takes more memory and hence arrays cant be declared in 01 level.but it is not clear to me? how internally cobol stores all these levels information? |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
I haven't seen it officially stated, but my guess about the restriction is that 01 levels are automatically aligned on double word boundaries, so when you "occurs" them the field definitions may not map properly for all occurances of the data. |
|
Back to top |
|
|
rischith
New User
Joined: 24 Feb 2006 Posts: 9 Location: bangalore
|
|
|
|
etijain wrote: |
hi...i have heard that 01 level in cobol takes more memory and hence arrays cant be declared in 01 level.but it is not clear to me? how internally cobol stores all these levels information? |
Hi,
Yes I agree with u, Even I have heard that 01 level variables consume more memory than level 05 or 10 variables. Can anyone please tell us the proper reason for it? |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Because an 01 level must be aligned on a doubleword boundary you can use upto 7 more bytes than using an 05 level, etc. for non-COMP fields.
Non 01 level, non-COMP fields don't have to be aligned. |
|
Back to top |
|
|
etijain
New User
Joined: 26 Nov 2005 Posts: 2
|
|
|
|
hi answer is not clear , can u elaborate more on this? |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi, what don't you understand? |
|
Back to top |
|
|
Aditya Bhardwaj Warnings : 1 New User
Joined: 02 Nov 2004 Posts: 18 Location: Noida, India
|
|
|
|
As per my knowledge, 01 level is itself is an entity, and putting and Occurs on that entity leads to redefining that entity with other, which is not allowed.
Also, since we require to make occur happen on the fields of the table(logical in this case) and NOT the table itself, we make a new place for the same by making occur happen on the fields and not on the table as a whole.
Please correct me, in case.
REMOVE THE EMAIL ID FROM YOUR SIGNATURE |
|
Back to top |
|
|
|