Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Why we prefer level no 77 for defining elementary item

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Yogesh_agarwal

New User


Joined: 15 Feb 2006
Posts: 5
Location: Noida

PostPosted: Wed Feb 15, 2006 7:17 pm    Post subject: Why we prefer level no 77 for defining elementary item
Reply with quote

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

Nirmala

New User


Joined: 13 Feb 2006
Posts: 3

PostPosted: Wed Feb 15, 2006 7:30 pm    Post subject:
Reply with quote

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

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Wed Feb 15, 2006 7:42 pm    Post subject:
Reply with quote

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

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Wed Feb 15, 2006 10:17 pm    Post subject: Re: Why we prefer level no 77 for defining elementary item
Reply with quote

http://ibmmainframes.com/viewtopic.php?t=1239

Regards,

Priyesh.
Back to top
View user's profile Send private message
Yogesh_agarwal

New User


Joined: 15 Feb 2006
Posts: 5
Location: Noida

PostPosted: Tue Feb 21, 2006 7:10 pm    Post subject: Re: Why we prefer level no 77 for defining elementary item
Reply with quote

Hi,
Thanks a lot to all of you.
Back to top
View user's profile Send private message
kanak

Moderator


Joined: 12 Mar 2005
Posts: 252
Location: India

PostPosted: Wed Feb 22, 2006 12:21 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compiler option for override the exte... muralikrishnan_new COBOL Programming 9 Fri Jul 08, 2016 12:09 pm
No new posts Syncsort TPF Level Majid Hussain SYNCSORT 2 Wed Apr 13, 2016 2:22 am
No new posts Need a logic to validate the data in ... sandeep kumar302 COBOL Programming 17 Mon Feb 01, 2016 3:30 pm
No new posts DB2 10.1 Share level locking and Sele... Mary Lewis DB2 1 Wed Apr 15, 2015 9:51 pm
No new posts CICS SE Level Openings in Accenture enikhilk Mainframe Jobs 0 Mon Sep 01, 2014 6:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us