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 

PROBLEM IN EDITING CHARACTER "Z"

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


Joined: 04 May 2005
Posts: 21
Topics: 11

PostPosted: Sun May 08, 2005 4:30 am    Post subject: PROBLEM IN EDITING CHARACTER "Z" Reply with quote

Hai,

I have coded in my program as given below but i am not getting the expected output.


01 SALARY PIC 9(5)V99.
01 EDIT-SALARY PIC $ZZ,ZZ9.99 USAGE IS DISPLAY.

MOVE 1234567 TO SALARY.
DISPLAY "SALARY" SALARY.
MOVE SALARY TO EDIT-SALARY.
DISPLAY "EDIT SALARY" EDIT-SALARY.
MOVE EDIT-SALARY TO SALARY.
DISPLAY " SALARY " SALARY.


SYSOUT
------
SALARY 3456700
EDIT-SALARY $34,567.00
SALARY 3456700


Can anyone tell me why i am getting the SALARY displayed as 3456700 instead of 1234567 as i am moving the value to a data item declared correctly with assumed decimal point.I am expecting the SALARY to be displayed as 1234567, 67 being the decimal values and 12345 being the integer value.Why are two zeroes coming at the end of SALARY field & first two digits 12 are being trucated.EDIT-SALARY is getting displayed as $34,567.00 whereas i want the EDIT-SALARY field to be displayed as $12,345.67.Can anyone tell me where i am wrong / weather my assumption is wrong / how can i get the expected output .
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Sun May 08, 2005 1:52 pm    Post subject: Reply with quote

You've missed out the decimal point.

Try "MOVE 12345.67 TO SALARY"
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon May 09, 2005 9:13 am    Post subject: Reply with quote

tommy123,

Check this link which explains in detail about the MOVE statement

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR10/6.2.24?DT=20020920180651

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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