View previous topic :: View next topic
|
Author |
Message |
skkumaran
New User
Joined: 31 Mar 2006 Posts: 2
|
|
|
|
I have a situation where I need to move a variable of s9(7)v99 with a value +240000032 to ZZZZZZZ.99- in MFCOBOL. When I perform this the data in the report is displayed as 243<000.32, but actually I want it 2430000.32
Can any one advise how to overcome this issue? |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Please paste actual code with variable descriptions. |
|
Back to top |
|
|
skkumaran
New User
Joined: 31 Mar 2006 Posts: 2
|
|
|
|
01 CURRENT-VARS.
05 CURRENT-SIT-TAX PICTURE S9(7)V99 VALUE +0.
01 P-VARS.
05 P-SIT-TAX PICTURE ZZZZZZZ.99-.
MOVE CURRENT-SIT-TAX TO P-SIT-TAX. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please re-post your your input and expected values. This "with a value +240000032 " would never return "I want it 2430000.32 " by simply moving it.
Try adding another Z to your edit picture.
When you say MFCOBOL, is this mainframe COBOL or MicroFocus COBOL? |
|
Back to top |
|
|
socker_dad
Active User
Joined: 05 Dec 2006 Posts: 177 Location: Seattle, WA
|
|
|
|
Hmm. I plugged your field definitions and data into MFE COBOL and got good results. If I try to overflow the field, that is moving +240000000.34 to CURRENT-SIT-TAX, the high order digits are truncated and the display is only the '.34' because the leading zeroes are suppressed. I wonder how you got the '<' in your field.
Is it possible that you have something else going on? |
|
Back to top |
|
|
divya_maddi
New User
Joined: 03 Nov 2005 Posts: 33
|
|
|
|
try replacing all the z's with -'s(hyphens i mean |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
divya_maddi wrote: |
try replacing all the z's with -'s(hyphens i mean |
Why? |
|
Back to top |
|
|
|