MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

why to put value as +0

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
javedsk12
Beginner


Joined: 14 Dec 2007
Posts: 66
Topics: 36
Location: pune

PostPosted: Wed Mar 26, 2008 12:31 am    Post subject: why to put value as +0 Reply with quote

hi,

this would seem the question for novice but really i am not getting that,
most of the values are initialized like this :

77 a pic 9(2) value is +0




Regards

javed shaikh
_________________
javed

-----------------------
The Word Impossible it self says i am possible(im possible)
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Wed Mar 26, 2008 10:31 am    Post subject: Reply with quote

My guess is that it's old code and the programmer did it out of force of habit. If the picture was signed as in S9(2), the assignment of the plus sign would have saved the compiler the time to assign the plus sign to the value. Time savings would have been negligible, but compliler time was more expensive decades ago. I can see no valid reason for it's use today. Also, since 77 levels have the disadvantage of being aligned on a double-word boundary, they are no longer encouraged by many shops. Another indication of "old" code.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Wed Apr 02, 2008 7:20 am    Post subject: Reply with quote

Terry,

I am interested to know more about the '77' lever disadvantage. Would you please explain with examples?

Thanks.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Wed Apr 02, 2008 8:44 am    Post subject: Reply with quote

Being double-word aligned, 77 levels reserve a multiple of 8 bytes for storage. An 8-byte field will reserve 8 bytes of storage, a 7-byte field will reserve 8 bytes, a 1-byte field, 8 bytes, a 9-byte field, 16 bytes, etc. To see this, check a compile listing data division map (or look at a formatted dump).
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group