Martin Hutchinson | 1 May 2009 12:38
Picon

[U2] Unidata calculations incorrect

Hi All,

We have Unidata 7.2 running on Windows 2008 server making incorrect 
calculations when numbers are close to zero. I understand there is a 
'WIDEZERO' parameter on Univers but I don't think there is an equivalent 
on Unidata. Below we have an example program and output.

001: BAL = 856.19
002: VAL1 = 287.31
003: VAL2 = 568.88
004: BAL = BAL - VAL1
005: BAL = BAL - VAL2
006: *
007: CRT "BAL [":BAL:"]"
008: *
009: IF BAL > 0 THEN
010:   CRT "BAL > 0"
011: END ELSE
012:   CRT "BAL <= 0"
013: END
014: *
015: IF INT(BAL) = BAL THEN
016:    CRT "Matches integer"
017: END ELSE
018:    CRT "Does not match integer"
019: END
020: *
021: IF ICONV(BAL,"MCN") > 0 THEN
022:    CRT "MCN BAL > 0"
023: END ELSE
(Continue reading)

Wally Terhune | 1 May 2009 15:00
Picon
Favicon

Re: [U2] Unidata calculations incorrect

look up the ECL statement FLOAT.PRECISION
Folks are often happiest with FLOAT.PRECISION 4

Wally Terhune
U2 Support Architect
IBM Information Management Software
Tel: (303) 773-7969             T/L 656-7969
Mobile: (303) 807-6222
Email: wallyt <at> us.ibm.com
http://www.ibm.com/software/data/u2/support

  From:       "Martin Hutchinson" <m.hutchinson <at> webcontrolltd.co.uk>

  To:         "u2 user group" <u2-users <at> listserver.u2ug.org>

  Date:       05/01/2009 05:21 AM

  Subject:    [U2] Unidata calculations incorrect

  Sent by:    owner-u2-users <at> listserver.u2ug.org

Hi All,

We have Unidata 7.2 running on Windows 2008 server making incorrect
calculations when numbers are close to zero. I understand there is a
'WIDEZERO' parameter on Univers but I don't think there is an equivalent
on Unidata. Below we have an example program and output.

001: BAL = 856.19
002: VAL1 = 287.31
(Continue reading)

Colin Alfke | 1 May 2009 15:23
Picon
Favicon

RE: [U2] Unidata calculations incorrect

Yes, this is a long running "feature" of UniData. With a simple statement you
can change the results of many of your calculations. Which setting should you
use? Well that depends on your data and your calculations. Look at the
PRECISION and FLOAT.PRECISION statements (if you don't believe that IBM
realizes that this is a problem but doesn't know how to fix it - at least
without "breaking" existing apps - look at the help for float.precision).

It's always seemed like the same issue Intel had with the original Pentiums -
that they had to recall. Perhaps they didn't have the "spin-masters" that IBM
has - or fewer customers willing to put up with this type of crap.

Your best bet is to avoid the issue by scaling your numbers so you don't do
calculations with decimal values.

hth

Colin Alfke

Calgary, Canada

> From: m.hutchinson

>
> Hi All,
>
> We have Unidata 7.2 running on Windows 2008 server making incorrect
> calculations when numbers are close to zero. I understand there is a
> 'WIDEZERO' parameter on Univers but I don't think there is an equivalent
> on Unidata. Below we have an example program and output.
>
(Continue reading)

Nick Gettino | 1 May 2009 15:21

RE: [U2] Unidata calculations incorrect

INT

Syntax

INT(num.expr)

Description

The UniBasic INT function returns the integer value of numeric
expression
num.expr.
Note: This function does not round num.expr, but truncates decimals.

Example

In the following example, the program segment prints 1, which is
the integer part of the number 1.734:
A = 1.734
PRINT INT(A)

Nicholas M Gettino | Director of Support & Professional Services |
EnRoute Emergency Systems, an Infor company | office: 813-207-6998 |
fax: 678-393-5389 nick.gettino <at> infor.com | www.enroute911.com
-----Original Message-----
From: owner-u2-users <at> listserver.u2ug.org
[mailto:owner-u2-users <at> listserver.u2ug.org] On Behalf Of Martin
Hutchinson
Sent: Friday, May 01, 2009 6:38 AM
To: u2 user group
Subject: [U2] Unidata calculations incorrect
(Continue reading)

Martin Hutchinson | 1 May 2009 15:51
Picon

Re: [U2] Unidata calculations incorrect

Thanks Wally and Colin,

That works a treat. I am surprised though that Unidata 'out of the box' 
has this problem and you have to work round it.

regards

Martin Hutchinson

Wally Terhune wrote:
> look up the ECL statement FLOAT.PRECISION
> Folks are often happiest with FLOAT.PRECISION 4
>
>
> Wally Terhune
> U2 Support Architect
> IBM Information Management Software
> Tel: (303) 773-7969             T/L 656-7969
> Mobile: (303) 807-6222
> Email: wallyt <at> us.ibm.com
> http://www.ibm.com/software/data/u2/support
>
>
>
>   From:       "Martin Hutchinson" <m.hutchinson <at> webcontrolltd.co.uk>
>
>   To:         "u2 user group" <u2-users <at> listserver.u2ug.org>
>
>   Date:       05/01/2009 05:21 AM
>
(Continue reading)

Horn, John | 1 May 2009 16:11

RE: [U2] Unidata calculations incorrect

Interesting.  This works as expected on our system.  Unidata 6.something
on AIX.  I wonder what is different in our settings.

:FLOAT.PRECISION            
FLOAT.PRECISION  mode  3     

:RUN FIXBP JH.TST     
BAL [0]               
BAL <= 0              
Matches integer       
MCN BAL <= 0          

John M. Horn | Solutions Engineer, Advisor Sr. | HealthLink |
314-989-6050 | jhorn <at> healthlink.com 

-----Original Message-----
From: owner-u2-users <at> listserver.u2ug.org
[mailto:owner-u2-users <at> listserver.u2ug.org] On Behalf Of Wally Terhune
Sent: Friday, May 01, 2009 8:00 AM
To: u2-users <at> listserver.u2ug.org
Subject: Re: [U2] Unidata calculations incorrect

look up the ECL statement FLOAT.PRECISION Folks are often happiest with
FLOAT.PRECISION 4

Wally Terhune
U2 Support Architect
IBM Information Management Software
Tel: (303) 773-7969             T/L 656-7969
Mobile: (303) 807-6222
(Continue reading)

Bill Haskett | 1 May 2009 17:33
Favicon

Re: [U2] Unidata calculations incorrect

   I got the following for UD v7.2.2 on Windows 2K3 Server w/all SPs
   :FLOAT.PRECISION
   FLOAT.PRECISION  mode  0
   :RUN BP TEST
   BAL [0]
   BAL > 0
   Does not match integer
   MCN BAL <= 0
   :FLOAT.PRECISION 4
   :RUN BP TEST
   BAL [0]
   BAL <= 0
   Matches integer
   MCN BAL <= 0
   Bill
   ______________________________________________________________________

   From: Horn, John <JHORN <at> healthlink.com>
   Sent: 5/1/2009 7:11 AM
   To: u2-users <at> listserver.u2ug.org
   Subject: Re: [U2] Unidata calculations incorrect

Interesting.  This works as expected on our system.  Unidata 6.something
on AIX.  I wonder what is different in our settings.

:FLOAT.PRECISION
FLOAT.PRECISION  mode  3

:RUN FIXBP JH.TST
BAL [0]
(Continue reading)

George Gallen | 1 May 2009 18:01

[U2] Forcing Paragraph Input to Uppercase?

How can you force paragraph supplied data to be uppercase?

ie.

TEST
001 PA
002 SELECT FILE WITH  <at> ID = "<<I2,ITEM>>"

>TEST HELLO

But if someone were to enter:

>TEST hello

I want the convert the ITEM form "hello" to "HELLO"

Possible in a Paragraph

UV/Information flavor

George
-------
u2-users mailing list
u2-users <at> listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Richard Nuckolls | 1 May 2009 18:02
Favicon

Re: [U2] [UV] Type 30 Semaphore Stuck - HELP!!!

Scott,

If you have UVNET, there is a work around that I came up with:  Create  
a "shadow" account with all file pointers that go to dynamically  
hashed files repointed to the network version of the file name, ie  
"myserver!/diskpath".  Then repoint your UniObjects to the shadow  
account.

The UVNET version of the rpc mechanism does not have the same problem  
closing dynamic files as UniObjects.

-Rick

On Apr 30, 2009, at 3:43 PM, iggchamp <at> comcast.net wrote:

> Thanks for the info Rick.B  I'll give it a look.
>
>
>
>
> ----- Original Message -----
> From: "Richard Nuckolls" <rick <at> lynden.com>
> To: u2-users <at> listserver.u2ug.org
> Sent: Thursday, April 30, 2009 11:35:49 AM GMT -06:00 US/Canada  
> Central
> Subject: Re: [U2] [UV] Type 30 Semaphore Stuck - HELP!!!
>
> If, by chance, you are using UniObjects, there is a bug in it, fixed B
> at 10.2.22, that can cause this problem when a session times out or B
> otherwise exits in a less than optimal manner.
(Continue reading)

kishor | 1 May 2009 19:06
Favicon

Re: [U2] Forcing Paragraph Input to Uppercase?

Try
TEST
> 001 PA
> 002 SELECT FILE WITH  <at> ID = "<<I2,ITEM,(MCU)>>"

Regards,
Kishor

Quoting George Gallen <ggallen <at> wyanokegroup.com>:

> How can you force paragraph supplied data to be uppercase?
>
> ie.
>
> TEST
> 001 PA
> 002 SELECT FILE WITH  <at> ID = "<<I2,ITEM>>"
>
>> TEST HELLO
>
> But if someone were to enter:
>
>> TEST hello
>
> I want the convert the ITEM form "hello" to "HELLO"
>
> Possible in a Paragraph
>
> UV/Information flavor
>
(Continue reading)


Gmane