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 

Facing problem in formating COMP-3 value

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


Joined: 03 Apr 2006
Posts: 3
Topics: 2

PostPosted: Mon Sep 17, 2007 9:16 am    Post subject: Facing problem in formating COMP-3 value Reply with quote

Facing problem in formating COMP-3 value

Moving a COMP-3 value to an Edited field. Check the fields below.

INPUT
-------

Data type : S9(09)V99 Comp-3
INPUT VALUE : 00019966330
Hex Value

009630
01963C


OUTPUT
---------

Data type : -(09)9.99
OUTPUT VALUE : 0000001996.63

I expected the output to be 000199663.30

But the value I am getting is 0000001996.63.

Any thoughts on this issue
Please let me know whats happen here.

I am just moving a COMP-3 Value to a EDITED field
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Mon Sep 17, 2007 9:34 am    Post subject: Reply with quote

I would expect the same. Something's not lining up. How do you get the value into the COMP-3 field? Try inserting a display statement for the COMP-3 field right before the move to the numeric edit field to verify the value.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Sep 17, 2007 9:49 am    Post subject: Reply with quote

Naveen_jr777,

Try this

Code:

MOVE 000199663.30 TO WS-INPUT
MOVE WS-INPUT TO WS-OUTPUT


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Naveen_jr777
Beginner


Joined: 03 Apr 2006
Posts: 3
Topics: 2

PostPosted: Mon Sep 17, 2007 11:52 pm    Post subject: Reply with quote

Hi Kolusu and Jsharon1248

The problem got solved.

After tyring all my possibilities, I just changed the edit field declaration from
-(08)9.99 to -(08)9,99

I was surprised to see that the output was 000199663,30

Then I realized that In the maiframe which I am working default is "DECIMAL POINT IS COMMA".

IF we try generating an output with a DOT '.' it will not give us the desired output.

Thankx for your suggessions and quick response.
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