IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

01 level in cobol takes more memory, Is it True?


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
etijain

New User


Joined: 26 Nov 2005
Posts: 2

PostPosted: Thu Jul 20, 2006 8:10 pm
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jul 22, 2006 7:39 pm
Reply with quote

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
View user's profile Send private message
rischith

New User


Joined: 24 Feb 2006
Posts: 9
Location: bangalore

PostPosted: Mon Jul 24, 2006 7:08 pm
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Jul 26, 2006 6:59 am
Reply with quote

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
View user's profile Send private message
etijain

New User


Joined: 26 Nov 2005
Posts: 2

PostPosted: Mon Aug 14, 2006 4:21 pm
Reply with quote

hi answer is not clear , can u elaborate more on this?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Aug 15, 2006 5:20 am
Reply with quote

Hi, what don't you understand?
Back to top
View user's profile Send private message
Aditya Bhardwaj
Warnings : 1

New User


Joined: 02 Nov 2004
Posts: 18
Location: Noida, India

PostPosted: Tue Aug 15, 2006 4:00 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts How to load to DB2 with column level ... DB2 6
Search our Forums:

Back to Top