View previous topic :: View next topic |
Author |
Message |
Naveen_jr777 Beginner
Joined: 03 Apr 2006 Posts: 3 Topics: 2
|
Posted: Mon Sep 17, 2007 9:16 am Post subject: Facing problem in formating COMP-3 value |
|
|
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 |
|
 |
jsharon1248 Intermediate
Joined: 08 Aug 2007 Posts: 291 Topics: 2 Location: Chicago
|
Posted: Mon Sep 17, 2007 9:34 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Sep 17, 2007 9:49 am Post subject: |
|
|
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 |
|
 |
Naveen_jr777 Beginner
Joined: 03 Apr 2006 Posts: 3 Topics: 2
|
Posted: Mon Sep 17, 2007 11:52 pm Post subject: |
|
|
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 |
|
 |
|
|