World Writer Calc field is WRONG!

ssolberg

VIP Member
So I've been doing World Writers "forever" and just noticed something that has me stunned and stumped. I created a simple calculated field that multiplied qty on hand (LIPQOH) x Unit Cost (COUNCS). The Data Dictionary has the qty field defined as no decimals and our Unit Cost field is 2 decimals. Simple, right? Here is an example of what my calculated field

7 * 29.05 = 203.30
1 * 21.85 = 21.80

Huh? All of the calculations seem to be rounding down? After dinking around with calculations, the only way I could get it to come up with the correct calculation was to first do this:
COUNCS * 100 (into a 0 decimal calc field XYZ so as to strip off the decimal) then,
(LIPQOH * XYZ) * 0.01) to calc the new extended cost into a 2 decimal field.

This can't be right... World Writer can't multiply 2 fields that have different decimal definitions? I must be totally missing something here.
 
FWIW I'm on 7.3 C11 and that calculation is working for me.


50 CALC 15 N A *DF N K 2 0 WORK

Result . . WORK CALC 15 2

Expression:

LIPQOH * COUNCS

Results:

502 * 3.3880 = 1,700.78

ssolberg <[email protected]> wrote: So I've been doing World Writers "forever" and just noticed something that has me stunned and stumped. I created a simple calculated field that multiplied qty on hand (LIPQOH) x Unit Cost (COUNCS). The Data Dictionary has the qty field defined as no decimals and our Unit Cost field is 2 decimals. Simple, right? Here is an example of what my calculated field

7 * 29.05 = 203.30
1 * 21.85 = 21.80

Huh? All of the calculations seem to be rounding down? After dinking around with calculations, the only way I could get it to come up with the correct calculation was to first do this:
COUNCS * 100 (into a 0 decimal calc field XYZ so as to strip off the decimal) then,
(LIPQOH * XYZ) * 0.01) to calc the new extended cost into a 2 decimal field.

This can't be right... World Writer can't multiply 2 fields that have different decimal definitions? I must be totally missing something here.Sannan Solberg Programmer/Developer/Anything-They-Give-Me World A7.3 c11
 
Sannan,

If you are on V5R1 or greater, there are some SAR's to fix the problem
with the WW's. Be sure that you have all of these:
A734498395
A734593755
A736166870
A736417931

See you in SF next week.

Jim Rubino
Senior Programmer Analyst
FIKE CORPORATION (r)
704 South 10th Street
Blue Springs, Mo. 64015
* Direct Dial - (816) 655-4579
* Or - (816) 229-6216 Ext. 1079
* [email protected] <mailto:[email protected]>
 
Jim and Sannan,

Look out for Karen Longland from Acergy in SF. She works with me (poor woman).
 
Dave,

Are saying we need to avoid her or find her and say hi?? LOL

Jim
 
what are you talking about?


Best Regards,

David McCune
SR. Programmer Analyst
Fike Corporation
Direct Line: 816-655-4577 Fax: 816-229-4615
704 S. 10th Street; Blue Springs, MO 64015
http://www.fike.com <http://www.fike.com/>
 
Back
Top