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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: 01 level in cobol takes more memory, Is it True?
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    Post subject:
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    Post subject: Re: 01 level in cobol takes more memory, Is it True?
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    Post subject:
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    Post subject: Re: 01 level in cobol takes more memory, Is it True?
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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