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 

Cobol - S9(2)

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


Joined: 12 Feb 2007
Posts: 26
Topics: 13

PostPosted: Tue Feb 13, 2007 5:33 am    Post subject: Cobol - S9(2) Reply with quote

Hello Gurus,

Cobol variable declared as S9(2) has value '0A'.
When I display this it is shown as '0A'.

I then moved this to a variable X(2).
The same X(2) is now displayed as '01' (Instead of '0A'.

Why is this happening?

Please let me know.


Quote:
Declarations:

15 PAGE-HOW-MANY PIC S9(2).
01 WS-PAGE-HOW-MANY PIC X(02) VALUE SPACES.
MOVE PAGE-HOW-MANY TO WS-PAGE-HOW-MANY.



Quote:
Display in spool:
PAGE-HOW-MANY = 0A
WS-PAGE-HOW-MANY = 01
Back to top
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Tue Feb 13, 2007 5:39 am    Post subject: Reply with quote

Naveen_Summary,

Please check this link which explains why u are getting the ouput as desired:

http://www.mvsforums.com/helpboards/viewtopic.php?t=6889&highlight=zoned+decimals
_________________
Shekar
Grow Technically
Back to top
View user's profile Send private message
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