Re: [U2] how to round to 2 decimals?

2010-10-14 Thread John Woollam
Hi

I've always used 'R2'

e.g. ANS = N1 * N2 'R2'

No scaling, just rounding

Regards

John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
Perkins PLC  |  01604 682751
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: 13 October 2010 22:22
To: u2-users@listserver.u2ug.org
Subject: [U2] how to round to 2 decimals?


I'm trying to figure out how to round to 2 decimal places with a
floating point in UniVerse

For example 2596 x 8.333 = 21,632.468

How would you round that in UniVerse to 21,632.47?

Thanks!
  
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

html
head
meta http-equiv=Content-type content=text/html; charset=UTF-8
/head
body
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and any 
attachments are confidential and intended solely for the use of the addressee 
only. If you have received this message in error, you must not copy, distribute 
or disclose the contents; please notify the sender immediately and delete the 
message. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
attributed to the sender and may not necessarily reflect the view of Travis 
Perkins plc or its subsidiaries (Travis Perkins). Agreements binding Travis 
Perkins may not be concluded by means of e-mail communication. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail transmissions are 
not secure and Travis Perkins accepts no responsibility for changes made to 
this 
message after it was sent. Whilst steps have been taken to ensure that this 
message is virus free, Travis Perkins accepts no liability for infection and 
recommends that you scan this e-mail and any attachments. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis Perkins 
plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road, 
Northampton, NN5 7UG. /SPAN/P
/BODY
/HTML

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] how to round to 2 decimals?

2010-10-14 Thread Larry Hiscock
Does UniVerse not support the DROUND() function?  

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
Sent: Thursday, October 14, 2010 1:02 AM
To: U2 Users List
Subject: Re: [U2] how to round to 2 decimals?

Hi

I've always used 'R2'

e.g. ANS = N1 * N2 'R2'

No scaling, just rounding

Regards

John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
Perkins PLC  |  01604 682751
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: 13 October 2010 22:22
To: u2-users@listserver.u2ug.org
Subject: [U2] how to round to 2 decimals?


I'm trying to figure out how to round to 2 decimal places with a
floating point in UniVerse

For example 2596 x 8.333 = 21,632.468

How would you round that in UniVerse to 21,632.47?

Thanks!
  
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

html
head
meta http-equiv=Content-type content=text/html; charset=UTF-8
/head
body
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and any 
attachments are confidential and intended solely for the use of the
addressee 
only. If you have received this message in error, you must not copy,
distribute 
or disclose the contents; please notify the sender immediately and delete
the 
message. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
attributed to the sender and may not necessarily reflect the view of Travis 
Perkins plc or its subsidiaries (Travis Perkins). Agreements binding Travis 
Perkins may not be concluded by means of e-mail communication. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail transmissions
are 
not secure and Travis Perkins accepts no responsibility for changes made to
this 
message after it was sent. Whilst steps have been taken to ensure that this 
message is virus free, Travis Perkins accepts no liability for infection and

recommends that you scan this e-mail and any attachments. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis
Perkins 
plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road, 
Northampton, NN5 7UG. /SPAN/P
/BODY
/HTML

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] how to round to 2 decimals?

2010-10-14 Thread John Woollam
Hi

Never heard of the DROUND() function in Universe.

Anyway, why would I want to use a function syntax when I can do

ANS = N1 * N2 'R2' and it is the answer that gets rounded?
Easy to write.
Easy to read...

John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
Perkins PLC  |  01604 682751

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
Sent: 14 October 2010 16:49
To: 'U2 Users List'
Subject: Re: [U2] how to round to 2 decimals?

Does UniVerse not support the DROUND() function?  

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
Sent: Thursday, October 14, 2010 1:02 AM
To: U2 Users List
Subject: Re: [U2] how to round to 2 decimals?

Hi

I've always used 'R2'

e.g. ANS = N1 * N2 'R2'

No scaling, just rounding

Regards

John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
Perkins PLC  |  01604 682751
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: 13 October 2010 22:22
To: u2-users@listserver.u2ug.org
Subject: [U2] how to round to 2 decimals?


I'm trying to figure out how to round to 2 decimal places with a
floating point in UniVerse

For example 2596 x 8.333 = 21,632.468

How would you round that in UniVerse to 21,632.47?

Thanks!
  
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

html
head
meta http-equiv=Content-type content=text/html; charset=UTF-8
/head
body
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
any 
attachments are confidential and intended solely for the use of the
addressee 
only. If you have received this message in error, you must not copy,
distribute 
or disclose the contents; please notify the sender immediately and
delete
the 
message. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
attributed to the sender and may not necessarily reflect the view of
Travis 
Perkins plc or its subsidiaries (Travis Perkins). Agreements binding
Travis 
Perkins may not be concluded by means of e-mail communication.
/SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail
transmissions
are 
not secure and Travis Perkins accepts no responsibility for changes made
to
this 
message after it was sent. Whilst steps have been taken to ensure that
this 
message is virus free, Travis Perkins accepts no liability for infection
and

recommends that you scan this e-mail and any attachments. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis
Perkins 
plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road, 
Northampton, NN5 7UG. /SPAN/P
/BODY
/HTML

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

html
head
meta http-equiv=Content-type content=text/html; charset=UTF-8
/head
body
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and any 
attachments are confidential and intended solely for the use of the addressee 
only. If you have received this message in error, you must not copy, distribute 
or disclose the contents; please notify the sender immediately and delete the 
message. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
attributed to the sender and may not necessarily reflect the view of Travis 
Perkins plc or its subsidiaries (Travis Perkins). Agreements binding Travis 
Perkins may not be concluded by means of e-mail communication. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail transmissions are 
not secure and Travis Perkins accepts no responsibility for changes made to 
this 
message after it was sent. Whilst steps have been taken to ensure that this 
message is virus free, Travis Perkins accepts no liability for infection and 
recommends that you scan this e-mail and any attachments. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis Perkins 
plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road, 
Northampton, NN5 7UG. /SPAN/P
/BODY
/HTML

___
U2-Users mailing list
U2

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread Larry Hiscock
What's so difficult about ANS = DROUND(N1 * N2, 2) ?


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
Sent: Thursday, October 14, 2010 8:59 AM
To: U2 Users List
Subject: Re: [U2] how to round to 2 decimals?

Hi

Never heard of the DROUND() function in Universe.

Anyway, why would I want to use a function syntax when I can do

ANS = N1 * N2 'R2' and it is the answer that gets rounded?
Easy to write.
Easy to read...

John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
Perkins PLC  |  01604 682751

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
Sent: 14 October 2010 16:49
To: 'U2 Users List'
Subject: Re: [U2] how to round to 2 decimals?

Does UniVerse not support the DROUND() function?  

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
Sent: Thursday, October 14, 2010 1:02 AM
To: U2 Users List
Subject: Re: [U2] how to round to 2 decimals?

Hi

I've always used 'R2'

e.g. ANS = N1 * N2 'R2'

No scaling, just rounding

Regards

John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
Perkins PLC  |  01604 682751
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: 13 October 2010 22:22
To: u2-users@listserver.u2ug.org
Subject: [U2] how to round to 2 decimals?


I'm trying to figure out how to round to 2 decimal places with a
floating point in UniVerse

For example 2596 x 8.333 = 21,632.468

How would you round that in UniVerse to 21,632.47?

Thanks!
  
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

html
head
meta http-equiv=Content-type content=text/html; charset=UTF-8
/head
body
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
any 
attachments are confidential and intended solely for the use of the
addressee 
only. If you have received this message in error, you must not copy,
distribute 
or disclose the contents; please notify the sender immediately and
delete
the 
message. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
attributed to the sender and may not necessarily reflect the view of
Travis 
Perkins plc or its subsidiaries (Travis Perkins). Agreements binding
Travis 
Perkins may not be concluded by means of e-mail communication.
/SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail
transmissions
are 
not secure and Travis Perkins accepts no responsibility for changes made
to
this 
message after it was sent. Whilst steps have been taken to ensure that
this 
message is virus free, Travis Perkins accepts no liability for infection
and

recommends that you scan this e-mail and any attachments. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis
Perkins 
plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road, 
Northampton, NN5 7UG. /SPAN/P
/BODY
/HTML

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

html
head
meta http-equiv=Content-type content=text/html; charset=UTF-8
/head
body
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and any 
attachments are confidential and intended solely for the use of the
addressee 
only. If you have received this message in error, you must not copy,
distribute 
or disclose the contents; please notify the sender immediately and delete
the 
message. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
attributed to the sender and may not necessarily reflect the view of Travis 
Perkins plc or its subsidiaries (Travis Perkins). Agreements binding Travis 
Perkins may not be concluded by means of e-mail communication. /SPAN/P
P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail transmissions
are 
not secure and Travis Perkins accepts no responsibility for changes made to
this 
message after it was sent. Whilst steps have been taken to ensure that this 
message is virus free, Travis Perkins accepts no liability for infection and

recommends that you scan this e-mail and any attachments. /SPAN/P
P style

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread Chris Austin

What's the diff between

 OCONV(X,'MR20') and DROUND(X,2) ??

where X = N1 * N2



 From: lar...@wcs-corp.com
 To: u2-users@listserver.u2ug.org
 Date: Thu, 14 Oct 2010 09:25:23 -0700
 Subject: Re: [U2] how to round to 2 decimals?
 
 What's so difficult about ANS = DROUND(N1 * N2, 2) ?
 
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
 Sent: Thursday, October 14, 2010 8:59 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?
 
 Hi
 
 Never heard of the DROUND() function in Universe.
 
 Anyway, why would I want to use a function syntax when I can do
 
 ANS = N1 * N2 'R2' and it is the answer that gets rounded?
 Easy to write.
 Easy to read...
 
 John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
 Perkins PLC  |  01604 682751
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
 Sent: 14 October 2010 16:49
 To: 'U2 Users List'
 Subject: Re: [U2] how to round to 2 decimals?
 
 Does UniVerse not support the DROUND() function?  
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
 Sent: Thursday, October 14, 2010 1:02 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?
 
 Hi
 
 I've always used 'R2'
 
 e.g. ANS = N1 * N2 'R2'
 
 No scaling, just rounding
 
 Regards
 
 John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
 Perkins PLC  |  01604 682751
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
 Sent: 13 October 2010 22:22
 To: u2-users@listserver.u2ug.org
 Subject: [U2] how to round to 2 decimals?
 
 
 I'm trying to figure out how to round to 2 decimal places with a
 floating point in UniVerse
 
 For example 2596 x 8.333 = 21,632.468
 
 How would you round that in UniVerse to 21,632.47?
 
 Thanks!
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 html
 head
 meta http-equiv=Content-type content=text/html; charset=UTF-8
 /head
 body
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
 any 
 attachments are confidential and intended solely for the use of the
 addressee 
 only. If you have received this message in error, you must not copy,
 distribute 
 or disclose the contents; please notify the sender immediately and
 delete
 the 
 message. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
 attributed to the sender and may not necessarily reflect the view of
 Travis 
 Perkins plc or its subsidiaries (Travis Perkins). Agreements binding
 Travis 
 Perkins may not be concluded by means of e-mail communication.
 /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail
 transmissions
 are 
 not secure and Travis Perkins accepts no responsibility for changes made
 to
 this 
 message after it was sent. Whilst steps have been taken to ensure that
 this 
 message is virus free, Travis Perkins accepts no liability for infection
 and
 
 recommends that you scan this e-mail and any attachments. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis
 Perkins 
 plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road, 
 Northampton, NN5 7UG. /SPAN/P
 /BODY
 /HTML
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 html
 head
 meta http-equiv=Content-type content=text/html; charset=UTF-8
 /head
 body
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and any 
 attachments are confidential and intended solely for the use of the
 addressee 
 only. If you have received this message in error, you must not copy,
 distribute 
 or disclose the contents; please notify the sender immediately and delete
 the 
 message. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
 attributed to the sender and may not necessarily reflect the view of Travis 
 Perkins plc or its subsidiaries (Travis Perkins). Agreements binding Travis 
 Perkins may not be concluded by means of e-mail communication. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread Chris Austin

Are you sure DROUND() is a UniVerse function?

When I do the following code:

X = 2596 * 8.333
*
PRINT DROUND(X,2)

I get the following error:

Array 'DROUND' never dimensioned.


 From: lar...@wcs-corp.com
 To: u2-users@listserver.u2ug.org
 Date: Thu, 14 Oct 2010 09:25:23 -0700
 Subject: Re: [U2] how to round to 2 decimals?
 
 What's so difficult about ANS = DROUND(N1 * N2, 2) ?
 
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
 Sent: Thursday, October 14, 2010 8:59 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?
 
 Hi
 
 Never heard of the DROUND() function in Universe.
 
 Anyway, why would I want to use a function syntax when I can do
 
 ANS = N1 * N2 'R2' and it is the answer that gets rounded?
 Easy to write.
 Easy to read...
 
 John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
 Perkins PLC  |  01604 682751
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
 Sent: 14 October 2010 16:49
 To: 'U2 Users List'
 Subject: Re: [U2] how to round to 2 decimals?
 
 Does UniVerse not support the DROUND() function?  
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
 Sent: Thursday, October 14, 2010 1:02 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?
 
 Hi
 
 I've always used 'R2'
 
 e.g. ANS = N1 * N2 'R2'
 
 No scaling, just rounding
 
 Regards
 
 John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
 Perkins PLC  |  01604 682751
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
 Sent: 13 October 2010 22:22
 To: u2-users@listserver.u2ug.org
 Subject: [U2] how to round to 2 decimals?
 
 
 I'm trying to figure out how to round to 2 decimal places with a
 floating point in UniVerse
 
 For example 2596 x 8.333 = 21,632.468
 
 How would you round that in UniVerse to 21,632.47?
 
 Thanks!
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 html
 head
 meta http-equiv=Content-type content=text/html; charset=UTF-8
 /head
 body
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
 any 
 attachments are confidential and intended solely for the use of the
 addressee 
 only. If you have received this message in error, you must not copy,
 distribute 
 or disclose the contents; please notify the sender immediately and
 delete
 the 
 message. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
 attributed to the sender and may not necessarily reflect the view of
 Travis 
 Perkins plc or its subsidiaries (Travis Perkins). Agreements binding
 Travis 
 Perkins may not be concluded by means of e-mail communication.
 /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail
 transmissions
 are 
 not secure and Travis Perkins accepts no responsibility for changes made
 to
 this 
 message after it was sent. Whilst steps have been taken to ensure that
 this 
 message is virus free, Travis Perkins accepts no liability for infection
 and
 
 recommends that you scan this e-mail and any attachments. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis
 Perkins 
 plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road, 
 Northampton, NN5 7UG. /SPAN/P
 /BODY
 /HTML
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 html
 head
 meta http-equiv=Content-type content=text/html; charset=UTF-8
 /head
 body
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and any 
 attachments are confidential and intended solely for the use of the
 addressee 
 only. If you have received this message in error, you must not copy,
 distribute 
 or disclose the contents; please notify the sender immediately and delete
 the 
 message. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
 attributed to the sender and may not necessarily reflect the view of Travis 
 Perkins plc or its subsidiaries (Travis Perkins). Agreements binding Travis 
 Perkins may not be concluded

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread Larry Hiscock
No idea if it's been implemented in UV ... it appears not, from your error
message.  It works in UD shrug


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Thursday, October 14, 2010 9:35 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] how to round to 2 decimals?


Are you sure DROUND() is a UniVerse function?

When I do the following code:

X = 2596 * 8.333
*
PRINT DROUND(X,2)

I get the following error:

Array 'DROUND' never dimensioned.


 From: lar...@wcs-corp.com
 To: u2-users@listserver.u2ug.org
 Date: Thu, 14 Oct 2010 09:25:23 -0700
 Subject: Re: [U2] how to round to 2 decimals?
 
 What's so difficult about ANS = DROUND(N1 * N2, 2) ?
 
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
 Sent: Thursday, October 14, 2010 8:59 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?
 
 Hi
 
 Never heard of the DROUND() function in Universe.
 
 Anyway, why would I want to use a function syntax when I can do
 
 ANS = N1 * N2 'R2' and it is the answer that gets rounded?
 Easy to write.
 Easy to read...
 
 John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
 Perkins PLC  |  01604 682751
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
 Sent: 14 October 2010 16:49
 To: 'U2 Users List'
 Subject: Re: [U2] how to round to 2 decimals?
 
 Does UniVerse not support the DROUND() function?  
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
 Sent: Thursday, October 14, 2010 1:02 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?
 
 Hi
 
 I've always used 'R2'
 
 e.g. ANS = N1 * N2 'R2'
 
 No scaling, just rounding
 
 Regards
 
 John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
 Perkins PLC  |  01604 682751
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
 Sent: 13 October 2010 22:22
 To: u2-users@listserver.u2ug.org
 Subject: [U2] how to round to 2 decimals?
 
 
 I'm trying to figure out how to round to 2 decimal places with a
 floating point in UniVerse
 
 For example 2596 x 8.333 = 21,632.468
 
 How would you round that in UniVerse to 21,632.47?
 
 Thanks!
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 html
 head
 meta http-equiv=Content-type content=text/html; charset=UTF-8
 /head
 body
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
 any 
 attachments are confidential and intended solely for the use of the
 addressee 
 only. If you have received this message in error, you must not copy,
 distribute 
 or disclose the contents; please notify the sender immediately and
 delete
 the 
 message. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
 attributed to the sender and may not necessarily reflect the view of
 Travis 
 Perkins plc or its subsidiaries (Travis Perkins). Agreements binding
 Travis 
 Perkins may not be concluded by means of e-mail communication.
 /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail
 transmissions
 are 
 not secure and Travis Perkins accepts no responsibility for changes made
 to
 this 
 message after it was sent. Whilst steps have been taken to ensure that
 this 
 message is virus free, Travis Perkins accepts no liability for infection
 and
 
 recommends that you scan this e-mail and any attachments. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis
 Perkins 
 plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road, 
 Northampton, NN5 7UG. /SPAN/P
 /BODY
 /HTML
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 html
 head
 meta http-equiv=Content-type content=text/html; charset=UTF-8
 /head
 body
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and any

 attachments are confidential and intended solely for the use of the
 addressee 
 only. If you have received this message in error, you must not copy,
 distribute 
 or disclose the contents; please

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread Baker Hughes
Would someone like to submit the DROUND function to the BB for a UV 
enhancement request?
If it is already implemented on UD then it should be fairly easy to justify to 
add to UV.
A short business case should be sufficient.

Log into U2UG and then click on BetterandBetter link, it will redirect to the 
application.

Thank you.
-Baker
U2UG BB workgroup



-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
Sent: Thursday, October 14, 2010 11:38 AM
To: 'U2 Users List'
Subject: Re: [U2] how to round to 2 decimals?

No idea if it's been implemented in UV ... it appears not, from your error 
message.  It works in UD shrug


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Thursday, October 14, 2010 9:35 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] how to round to 2 decimals?


Are you sure DROUND() is a UniVerse function?

When I do the following code:

X = 2596 * 8.333
*
PRINT DROUND(X,2)

I get the following error:

Array 'DROUND' never dimensioned.


 From: lar...@wcs-corp.com
 To: u2-users@listserver.u2ug.org
 Date: Thu, 14 Oct 2010 09:25:23 -0700
 Subject: Re: [U2] how to round to 2 decimals?

 What's so difficult about ANS = DROUND(N1 * N2, 2) ?


 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John
 Woollam
 Sent: Thursday, October 14, 2010 8:59 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?

 Hi

 Never heard of the DROUND() function in Universe.

 Anyway, why would I want to use a function syntax when I can do

 ANS = N1 * N2 'R2' and it is the answer that gets rounded?
 Easy to write.
 Easy to read...

 John Woollam  |  Group Function Support 1  (Finance Systems)  |
 Travis Perkins PLC  |  01604 682751

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry
 Hiscock
 Sent: 14 October 2010 16:49
 To: 'U2 Users List'
 Subject: Re: [U2] how to round to 2 decimals?

 Does UniVerse not support the DROUND() function?

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John
 Woollam
 Sent: Thursday, October 14, 2010 1:02 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?

 Hi

 I've always used 'R2'

 e.g. ANS = N1 * N2 'R2'

 No scaling, just rounding

 Regards

 John Woollam  |  Group Function Support 1  (Finance Systems)  |
 Travis Perkins PLC  |  01604 682751 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris
 Austin
 Sent: 13 October 2010 22:22
 To: u2-users@listserver.u2ug.org
 Subject: [U2] how to round to 2 decimals?


 I'm trying to figure out how to round to 2 decimal places with a
 floating point in UniVerse

 For example 2596 x 8.333 = 21,632.468

 How would you round that in UniVerse to 21,632.47?

 Thanks!

 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

 html
 head
 meta http-equiv=Content-type content=text/html; charset=UTF-8
 /head body P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
 any attachments are confidential and intended solely for the use of
 the addressee only. If you have received this message in error, you
 must not copy, distribute or disclose the contents; please notify the
 sender immediately and delete the message. /SPAN/P P
 style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is
 attributed to the sender and may not necessarily reflect the view of
 Travis Perkins plc or its subsidiaries (Travis Perkins). Agreements
 binding Travis Perkins may not be concluded by means of e-mail
 communication.
 /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail
 transmissions are not secure and Travis Perkins accepts no
 responsibility for changes made to this message after it was sent.
 Whilst steps have been taken to ensure that this message is virus
 free, Travis Perkins accepts no liability for infection and

 recommends that you scan this e-mail and any attachments. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis
 Perkins plc. Registered Office: Lodge Way House, Lodge Way, Harlestone
 Road, Northampton, NN5 7UG. /SPAN/P /BODY /HTML

 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

 ___
 U2-Users

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread Rick Nuckolls
Universe does not have a DROUND() function that I can find.  However, at some 
point a FIX() function was included in the language.

:ED BP FIX 
5 lines long.

: P
0001: ABC = 123.45678
0002: PRINT FIX(ABC,2)
0003: PRINT FIX(ABC, 2, 0)
0004: PRINT FIX(ABC, 2, 1)
0005: END
Bottom at line 5.
: Q
:RUN BP FIX
123.46
123.46
123.45

Rick Nuckolls
Lynden Inc

On Oct 14, 2010, at 9:37 AM, Larry Hiscock wrote:

 No idea if it's been implemented in UV ... it appears not, from your error
 message.  It works in UD shrug
 
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
 Sent: Thursday, October 14, 2010 9:35 AM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] how to round to 2 decimals?
 
 
 Are you sure DROUND() is a UniVerse function?
 
 When I do the following code:
 
 X = 2596 * 8.333
 *
 PRINT DROUND(X,2)
 
 I get the following error:
 
 Array 'DROUND' never dimensioned.
 
 
 From: lar...@wcs-corp.com
 To: u2-users@listserver.u2ug.org
 Date: Thu, 14 Oct 2010 09:25:23 -0700
 Subject: Re: [U2] how to round to 2 decimals?
 
 What's so difficult about ANS = DROUND(N1 * N2, 2) ?
 
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
 Sent: Thursday, October 14, 2010 8:59 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?
 
 Hi
 
 Never heard of the DROUND() function in Universe.
 
 Anyway, why would I want to use a function syntax when I can do
 
 ANS = N1 * N2 'R2' and it is the answer that gets rounded?
 Easy to write.
 Easy to read...
 
 John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
 Perkins PLC  |  01604 682751
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
 Sent: 14 October 2010 16:49
 To: 'U2 Users List'
 Subject: Re: [U2] how to round to 2 decimals?
 
 Does UniVerse not support the DROUND() function?  
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
 Sent: Thursday, October 14, 2010 1:02 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?
 
 Hi
 
 I've always used 'R2'
 
 e.g. ANS = N1 * N2 'R2'
 
 No scaling, just rounding
 
 Regards
 
 John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
 Perkins PLC  |  01604 682751
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
 Sent: 13 October 2010 22:22
 To: u2-users@listserver.u2ug.org
 Subject: [U2] how to round to 2 decimals?
 
 
 I'm trying to figure out how to round to 2 decimal places with a
 floating point in UniVerse
 
 For example 2596 x 8.333 = 21,632.468
 
 How would you round that in UniVerse to 21,632.47?
 
 Thanks!

 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 html
 head
 meta http-equiv=Content-type content=text/html; charset=UTF-8
 /head
 body
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
 any 
 attachments are confidential and intended solely for the use of the
 addressee 
 only. If you have received this message in error, you must not copy,
 distribute 
 or disclose the contents; please notify the sender immediately and
 delete
 the 
 message. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
 attributed to the sender and may not necessarily reflect the view of
 Travis 
 Perkins plc or its subsidiaries (Travis Perkins). Agreements binding
 Travis 
 Perkins may not be concluded by means of e-mail communication.
 /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail
 transmissions
 are 
 not secure and Travis Perkins accepts no responsibility for changes made
 to
 this 
 message after it was sent. Whilst steps have been taken to ensure that
 this 
 message is virus free, Travis Perkins accepts no liability for infection
 and
 
 recommends that you scan this e-mail and any attachments. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis
 Perkins 
 plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road, 
 Northampton, NN5 7UG. /SPAN/P
 /BODY
 /HTML
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread George Gallen
I always used   int ( ( x * 10**y) + roundinglevel ) / 10**y
where x is the original number, and y is the number of decimals
and where roundinglevel is a cutoff, ie (.5 so less than .5 rounds
down, and .5 and greater rounds up), if I wanted all number to
be rounded up, just use .. 

And it works in all flavors

George

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
 boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
 Sent: Thursday, October 14, 2010 12:25 PM
 To: 'U2 Users List'
 Subject: Re: [U2] how to round to 2 decimals?
 
 What's so difficult about ANS = DROUND(N1 * N2, 2) ?
 
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
 Sent: Thursday, October 14, 2010 8:59 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?
 
 Hi
 
 Never heard of the DROUND() function in Universe.
 
 Anyway, why would I want to use a function syntax when I can do
 
 ANS = N1 * N2 'R2' and it is the answer that gets rounded?
 Easy to write.
 Easy to read...
 
 John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
 Perkins PLC  |  01604 682751
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry
 Hiscock
 Sent: 14 October 2010 16:49
 To: 'U2 Users List'
 Subject: Re: [U2] how to round to 2 decimals?
 
 Does UniVerse not support the DROUND() function?
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
 Sent: Thursday, October 14, 2010 1:02 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?
 
 Hi
 
 I've always used 'R2'
 
 e.g. ANS = N1 * N2 'R2'
 
 No scaling, just rounding
 
 Regards
 
 John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
 Perkins PLC  |  01604 682751
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
 Sent: 13 October 2010 22:22
 To: u2-users@listserver.u2ug.org
 Subject: [U2] how to round to 2 decimals?
 
 
 I'm trying to figure out how to round to 2 decimal places with a
 floating point in UniVerse
 
 For example 2596 x 8.333 = 21,632.468
 
 How would you round that in UniVerse to 21,632.47?
 
 Thanks!
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 html
 head
 meta http-equiv=Content-type content=text/html; charset=UTF-8
 /head
 body
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
 any
 attachments are confidential and intended solely for the use of the
 addressee
 only. If you have received this message in error, you must not copy,
 distribute
 or disclose the contents; please notify the sender immediately and
 delete
 the
 message. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is
 attributed to the sender and may not necessarily reflect the view of
 Travis
 Perkins plc or its subsidiaries (Travis Perkins). Agreements binding
 Travis
 Perkins may not be concluded by means of e-mail communication.
 /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail
 transmissions
 are
 not secure and Travis Perkins accepts no responsibility for changes
 made
 to
 this
 message after it was sent. Whilst steps have been taken to ensure that
 this
 message is virus free, Travis Perkins accepts no liability for
 infection
 and
 
 recommends that you scan this e-mail and any attachments. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis
 Perkins
 plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road,
 Northampton, NN5 7UG. /SPAN/P
 /BODY
 /HTML
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 html
 head
 meta http-equiv=Content-type content=text/html; charset=UTF-8
 /head
 body
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
 any
 attachments are confidential and intended solely for the use of the
 addressee
 only. If you have received this message in error, you must not copy,
 distribute
 or disclose the contents; please notify the sender immediately and
 delete
 the
 message. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread Chris Austin

Thanks George,

I know this will be helpful with scaling, I know the need will arise for this 
in the future. 

-Chris



 From: ggal...@wyanokegroup.com
 To: u2-users@listserver.u2ug.org
 Date: Thu, 14 Oct 2010 12:23:50 -0500
 Subject: Re: [U2] how to round to 2 decimals?
 
 I always used   int ( ( x * 10**y) + roundinglevel ) / 10**y
 where x is the original number, and y is the number of decimals
 and where roundinglevel is a cutoff, ie (.5 so less than .5 rounds
 down, and .5 and greater rounds up), if I wanted all number to
 be rounded up, just use .. 
 
 And it works in all flavors
 
 George
 
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
  boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
  Sent: Thursday, October 14, 2010 12:25 PM
  To: 'U2 Users List'
  Subject: Re: [U2] how to round to 2 decimals?
  
  What's so difficult about ANS = DROUND(N1 * N2, 2) ?
  
  
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
  Sent: Thursday, October 14, 2010 8:59 AM
  To: U2 Users List
  Subject: Re: [U2] how to round to 2 decimals?
  
  Hi
  
  Never heard of the DROUND() function in Universe.
  
  Anyway, why would I want to use a function syntax when I can do
  
  ANS = N1 * N2 'R2' and it is the answer that gets rounded?
  Easy to write.
  Easy to read...
  
  John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
  Perkins PLC  |  01604 682751
  
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry
  Hiscock
  Sent: 14 October 2010 16:49
  To: 'U2 Users List'
  Subject: Re: [U2] how to round to 2 decimals?
  
  Does UniVerse not support the DROUND() function?
  
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
  Sent: Thursday, October 14, 2010 1:02 AM
  To: U2 Users List
  Subject: Re: [U2] how to round to 2 decimals?
  
  Hi
  
  I've always used 'R2'
  
  e.g. ANS = N1 * N2 'R2'
  
  No scaling, just rounding
  
  Regards
  
  John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
  Perkins PLC  |  01604 682751
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
  Sent: 13 October 2010 22:22
  To: u2-users@listserver.u2ug.org
  Subject: [U2] how to round to 2 decimals?
  
  
  I'm trying to figure out how to round to 2 decimal places with a
  floating point in UniVerse
  
  For example 2596 x 8.333 = 21,632.468
  
  How would you round that in UniVerse to 21,632.47?
  
  Thanks!
  
  ___
  U2-Users mailing list
  U2-Users@listserver.u2ug.org
  http://listserver.u2ug.org/mailman/listinfo/u2-users
  
  html
  head
  meta http-equiv=Content-type content=text/html; charset=UTF-8
  /head
  body
  P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
  style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
  any
  attachments are confidential and intended solely for the use of the
  addressee
  only. If you have received this message in error, you must not copy,
  distribute
  or disclose the contents; please notify the sender immediately and
  delete
  the
  message. /SPAN/P
  P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
  style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is
  attributed to the sender and may not necessarily reflect the view of
  Travis
  Perkins plc or its subsidiaries (Travis Perkins). Agreements binding
  Travis
  Perkins may not be concluded by means of e-mail communication.
  /SPAN/P
  P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
  style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail
  transmissions
  are
  not secure and Travis Perkins accepts no responsibility for changes
  made
  to
  this
  message after it was sent. Whilst steps have been taken to ensure that
  this
  message is virus free, Travis Perkins accepts no liability for
  infection
  and
  
  recommends that you scan this e-mail and any attachments. /SPAN/P
  P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
  style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis
  Perkins
  plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road,
  Northampton, NN5 7UG. /SPAN/P
  /BODY
  /HTML
  
  ___
  U2-Users mailing list
  U2-Users@listserver.u2ug.org
  http://listserver.u2ug.org/mailman/listinfo/u2-users
  
  ___
  U2-Users mailing list
  U2-Users@listserver.u2ug.org
  http://listserver.u2ug.org/mailman/listinfo/u2-users
  
  html
  head
  meta http-equiv=Content-type content=text/html; charset=UTF-8
  /head
  body
  P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
  style=FONT-SIZE

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread Don Robinson
How about this?

X = 2596 * 8.333 ;*  [X will contain 21632.468]
ANS = INT((X * 100) + .5) / 100
PRINT ANS


The (X * 100) changes X to 2163246.8
The + .5 changes X to 2163247.3
The INT() changes X to 2163247
The / 100 changes X to 21632.47

The output will displays 21632.47

Using a FOR NEXT loop, I run INT((21632.468 * 100) + .5) / 100 and 
the OCONV(21632.468,'MR20') versions one million times and got .84 seconds for 
the INT version and 4.9 seconds for the OCONV version.

I doubt that 4 seconds would make a difference to most programs but every 
little 
helps.

I also run the OCONV(ICONV(21632.468,'MD2'),'MD2') version and it took 5.1 
seconds.

My point: There is more than one way to skin a cat!

Don Robinson


 




From: Chris Austin cjausti...@hotmail.com
To: u2-users@listserver.u2ug.org
Sent: Thu, October 14, 2010 12:34:36 PM
Subject: Re: [U2] how to round to 2 decimals?


Are you sure DROUND() is a UniVerse function?

When I do the following code:

X = 2596 * 8.333
*
PRINT DROUND(X,2)

I get the following error:

Array 'DROUND' never dimensioned.


 From: lar...@wcs-corp.com
 To: u2-users@listserver.u2ug.org
 Date: Thu, 14 Oct 2010 09:25:23 -0700
 Subject: Re: [U2] how to round to 2 decimals?
 
 What's so difficult about ANS = DROUND(N1 * N2, 2) ?
 
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
 Sent: Thursday, October 14, 2010 8:59 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?
 
 Hi
 
 Never heard of the DROUND() function in Universe.
 
 Anyway, why would I want to use a function syntax when I can do
 
 ANS = N1 * N2 'R2' and it is the answer that gets rounded?
 Easy to write.
 Easy to read...
 
 John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
 Perkins PLC  |  01604 682751
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
 Sent: 14 October 2010 16:49
 To: 'U2 Users List'
 Subject: Re: [U2] how to round to 2 decimals?
 
 Does UniVerse not support the DROUND() function?  
 
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
 Sent: Thursday, October 14, 2010 1:02 AM
 To: U2 Users List
 Subject: Re: [U2] how to round to 2 decimals?
 
 Hi
 
 I've always used 'R2'
 
 e.g. ANS = N1 * N2 'R2'
 
 No scaling, just rounding
 
 Regards
 
 John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
 Perkins PLC  |  01604 682751
 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
 Sent: 13 October 2010 22:22
 To: u2-users@listserver.u2ug.org
 Subject: [U2] how to round to 2 decimals?
 
 
 I'm trying to figure out how to round to 2 decimal places with a
 floating point in UniVerse
 
 For example 2596 x 8.333 = 21,632.468
 
 How would you round that in UniVerse to 21,632.47?
 
 Thanks!
                          
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 html
 head
 meta http-equiv=Content-type content=text/html; charset=UTF-8
 /head
 body
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
 any 
 attachments are confidential and intended solely for the use of the
 addressee 
 only. If you have received this message in error, you must not copy,
 distribute 
 or disclose the contents; please notify the sender immediately and
 delete
 the 
 message. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
 attributed to the sender and may not necessarily reflect the view of
 Travis 
 Perkins plc or its subsidiaries (Travis Perkins). Agreements binding
 Travis 
 Perkins may not be concluded by means of e-mail communication.
 /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail
 transmissions
 are 
 not secure and Travis Perkins accepts no responsibility for changes made
 to
 this 
 message after it was sent. Whilst steps have been taken to ensure that
 this 
 message is virus free, Travis Perkins accepts no liability for infection
 and
 
 recommends that you scan this e-mail and any attachments. /SPAN/P
 P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
 style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis
 Perkins 
 plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road, 
 Northampton, NN5 7UG. /SPAN/P
 /BODY
 /HTML
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread Chris Austin

Dan,

That's pretty cool you got those results actually on your benchmark. I can only 
imagine why UniVerse would
be like that? Maybe it has to look up some libraries with OCONV or do some 
stupid cross-checking. Either
way that's actually a considerable difference if you were in a LOOP with 5,000+ 
records lets says.

That would shave off 5 1/2 minutes of processing time!

-Chris


 Date: Thu, 14 Oct 2010 11:00:08 -0700
 From: donr_w...@yahoo.com
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] how to round to 2 decimals?
 
 How about this?
 
 X = 2596 * 8.333 ;*  [X will contain 21632.468]
 ANS = INT((X * 100) + .5) / 100
 PRINT ANS
 
 
 The (X * 100) changes X to 2163246.8
 The + .5 changes X to 2163247.3
 The INT() changes X to 2163247
 The / 100 changes X to 21632.47
 
 The output will displays 21632.47
 
 Using a FOR NEXT loop, I run INT((21632.468 * 100) + .5) / 100 and 
 the OCONV(21632.468,'MR20') versions one million times and got .84 seconds 
 for 
 the INT version and 4.9 seconds for the OCONV version.
 
 I doubt that 4 seconds would make a difference to most programs but every 
 little 
 helps.
 
 I also run the OCONV(ICONV(21632.468,'MD2'),'MD2') version and it took 5.1 
 seconds.
 
 My point: There is more than one way to skin a cat!
 
 Don Robinson
 
 
  
 
 
 
 
 From: Chris Austin cjausti...@hotmail.com
 To: u2-users@listserver.u2ug.org
 Sent: Thu, October 14, 2010 12:34:36 PM
 Subject: Re: [U2] how to round to 2 decimals?
 
 
 Are you sure DROUND() is a UniVerse function?
 
 When I do the following code:
 
 X = 2596 * 8.333
 *
 PRINT DROUND(X,2)
 
 I get the following error:
 
 Array 'DROUND' never dimensioned.
 
 
  From: lar...@wcs-corp.com
  To: u2-users@listserver.u2ug.org
  Date: Thu, 14 Oct 2010 09:25:23 -0700
  Subject: Re: [U2] how to round to 2 decimals?
  
  What's so difficult about ANS = DROUND(N1 * N2, 2) ?
  
  
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
  Sent: Thursday, October 14, 2010 8:59 AM
  To: U2 Users List
  Subject: Re: [U2] how to round to 2 decimals?
  
  Hi
  
  Never heard of the DROUND() function in Universe.
  
  Anyway, why would I want to use a function syntax when I can do
  
  ANS = N1 * N2 'R2' and it is the answer that gets rounded?
  Easy to write.
  Easy to read...
  
  John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
  Perkins PLC  |  01604 682751
  
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
  Sent: 14 October 2010 16:49
  To: 'U2 Users List'
  Subject: Re: [U2] how to round to 2 decimals?
  
  Does UniVerse not support the DROUND() function?  
  
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
  Sent: Thursday, October 14, 2010 1:02 AM
  To: U2 Users List
  Subject: Re: [U2] how to round to 2 decimals?
  
  Hi
  
  I've always used 'R2'
  
  e.g. ANS = N1 * N2 'R2'
  
  No scaling, just rounding
  
  Regards
  
  John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
  Perkins PLC  |  01604 682751
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
  Sent: 13 October 2010 22:22
  To: u2-users@listserver.u2ug.org
  Subject: [U2] how to round to 2 decimals?
  
  
  I'm trying to figure out how to round to 2 decimal places with a
  floating point in UniVerse
  
  For example 2596 x 8.333 = 21,632.468
  
  How would you round that in UniVerse to 21,632.47?
  
  Thanks!
   
  ___
  U2-Users mailing list
  U2-Users@listserver.u2ug.org
  http://listserver.u2ug.org/mailman/listinfo/u2-users
  
  html
  head
  meta http-equiv=Content-type content=text/html; charset=UTF-8
  /head
  body
  P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
  style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
  any 
  attachments are confidential and intended solely for the use of the
  addressee 
  only. If you have received this message in error, you must not copy,
  distribute 
  or disclose the contents; please notify the sender immediately and
  delete
  the 
  message. /SPAN/P
  P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
  style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
  attributed to the sender and may not necessarily reflect the view of
  Travis 
  Perkins plc or its subsidiaries (Travis Perkins). Agreements binding
  Travis 
  Perkins may not be concluded by means of e-mail communication.
  /SPAN/P
  P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
  style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail
  transmissions
  are 
  not secure and Travis Perkins accepts

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread Chris Austin

oops.. I should have read your post closer. 

' one million times' - so yeah that wouldn't make a huge difference but it's 
still good to know!

-Chris


 Date: Thu, 14 Oct 2010 11:00:08 -0700
 From: donr_w...@yahoo.com
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] how to round to 2 decimals?
 
 How about this?
 
 X = 2596 * 8.333 ;*  [X will contain 21632.468]
 ANS = INT((X * 100) + .5) / 100
 PRINT ANS
 
 
 The (X * 100) changes X to 2163246.8
 The + .5 changes X to 2163247.3
 The INT() changes X to 2163247
 The / 100 changes X to 21632.47
 
 The output will displays 21632.47
 
 Using a FOR NEXT loop, I run INT((21632.468 * 100) + .5) / 100 and 
 the OCONV(21632.468,'MR20') versions one million times and got .84 seconds 
 for 
 the INT version and 4.9 seconds for the OCONV version.
 
 I doubt that 4 seconds would make a difference to most programs but every 
 little 
 helps.
 
 I also run the OCONV(ICONV(21632.468,'MD2'),'MD2') version and it took 5.1 
 seconds.
 
 My point: There is more than one way to skin a cat!
 
 Don Robinson
 
 
  
 
 
 
 
 From: Chris Austin cjausti...@hotmail.com
 To: u2-users@listserver.u2ug.org
 Sent: Thu, October 14, 2010 12:34:36 PM
 Subject: Re: [U2] how to round to 2 decimals?
 
 
 Are you sure DROUND() is a UniVerse function?
 
 When I do the following code:
 
 X = 2596 * 8.333
 *
 PRINT DROUND(X,2)
 
 I get the following error:
 
 Array 'DROUND' never dimensioned.
 
 
  From: lar...@wcs-corp.com
  To: u2-users@listserver.u2ug.org
  Date: Thu, 14 Oct 2010 09:25:23 -0700
  Subject: Re: [U2] how to round to 2 decimals?
  
  What's so difficult about ANS = DROUND(N1 * N2, 2) ?
  
  
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
  Sent: Thursday, October 14, 2010 8:59 AM
  To: U2 Users List
  Subject: Re: [U2] how to round to 2 decimals?
  
  Hi
  
  Never heard of the DROUND() function in Universe.
  
  Anyway, why would I want to use a function syntax when I can do
  
  ANS = N1 * N2 'R2' and it is the answer that gets rounded?
  Easy to write.
  Easy to read...
  
  John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
  Perkins PLC  |  01604 682751
  
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
  Sent: 14 October 2010 16:49
  To: 'U2 Users List'
  Subject: Re: [U2] how to round to 2 decimals?
  
  Does UniVerse not support the DROUND() function?  
  
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Woollam
  Sent: Thursday, October 14, 2010 1:02 AM
  To: U2 Users List
  Subject: Re: [U2] how to round to 2 decimals?
  
  Hi
  
  I've always used 'R2'
  
  e.g. ANS = N1 * N2 'R2'
  
  No scaling, just rounding
  
  Regards
  
  John Woollam  |  Group Function Support 1  (Finance Systems)  |  Travis
  Perkins PLC  |  01604 682751
  -Original Message-
  From: u2-users-boun...@listserver.u2ug.org
  [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
  Sent: 13 October 2010 22:22
  To: u2-users@listserver.u2ug.org
  Subject: [U2] how to round to 2 decimals?
  
  
  I'm trying to figure out how to round to 2 decimal places with a
  floating point in UniVerse
  
  For example 2596 x 8.333 = 21,632.468
  
  How would you round that in UniVerse to 21,632.47?
  
  Thanks!
   
  ___
  U2-Users mailing list
  U2-Users@listserver.u2ug.org
  http://listserver.u2ug.org/mailman/listinfo/u2-users
  
  html
  head
  meta http-equiv=Content-type content=text/html; charset=UTF-8
  /head
  body
  P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
  style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and
  any 
  attachments are confidential and intended solely for the use of the
  addressee 
  only. If you have received this message in error, you must not copy,
  distribute 
  or disclose the contents; please notify the sender immediately and
  delete
  the 
  message. /SPAN/P
  P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
  style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is 
  attributed to the sender and may not necessarily reflect the view of
  Travis 
  Perkins plc or its subsidiaries (Travis Perkins). Agreements binding
  Travis 
  Perkins may not be concluded by means of e-mail communication.
  /SPAN/P
  P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN 
  style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail
  transmissions
  are 
  not secure and Travis Perkins accepts no responsibility for changes made
  to
  this 
  message after it was sent. Whilst steps have been taken to ensure that
  this 
  message is virus free, Travis Perkins accepts no liability for infection
  and
  
  recommends that you

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread George Gallen
so, when the bank rounds everyones bank balances down the cent, the system
would barely pause.maybe noone would noticehmmm.

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
 boun...@listserver.u2ug.org] On Behalf Of Chris Austin
 Sent: Thursday, October 14, 2010 2:05 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] how to round to 2 decimals?
 
 
 oops.. I should have read your post closer.
 
 ' one million times' - so yeah that wouldn't make a huge difference but
 it's still good to know!
 
 -Chris
 
 
  Date: Thu, 14 Oct 2010 11:00:08 -0700
  From: donr_w...@yahoo.com
  To: u2-users@listserver.u2ug.org
  Subject: Re: [U2] how to round to 2 decimals?
 
  How about this?
 
  X = 2596 * 8.333 ;*  [X will contain 21632.468]
  ANS = INT((X * 100) + .5) / 100
  PRINT ANS
 
 
  The (X * 100) changes X to 2163246.8
  The + .5 changes X to 2163247.3
  The INT() changes X to 2163247
  The / 100 changes X to 21632.47
 
  The output will displays 21632.47
 
  Using a FOR NEXT loop, I run INT((21632.468 * 100) + .5) / 100 and
  the OCONV(21632.468,'MR20') versions one million times and got .84
 seconds for
  the INT version and 4.9 seconds for the OCONV version.
 
  I doubt that 4 seconds would make a difference to most programs but
 every little
  helps.
 
  I also run the OCONV(ICONV(21632.468,'MD2'),'MD2') version and it
 took 5.1
  seconds.
 
  My point: There is more than one way to skin a cat!
 
  Don Robinson
 
 
 
 
 
 
  
  From: Chris Austin cjausti...@hotmail.com
  To: u2-users@listserver.u2ug.org
  Sent: Thu, October 14, 2010 12:34:36 PM
  Subject: Re: [U2] how to round to 2 decimals?
 
 
  Are you sure DROUND() is a UniVerse function?
 
  When I do the following code:
 
  X = 2596 * 8.333
  *
  PRINT DROUND(X,2)
 
  I get the following error:
 
  Array 'DROUND' never dimensioned.
 
 
   From: lar...@wcs-corp.com
   To: u2-users@listserver.u2ug.org
   Date: Thu, 14 Oct 2010 09:25:23 -0700
   Subject: Re: [U2] how to round to 2 decimals?
  
   What's so difficult about ANS = DROUND(N1 * N2, 2) ?
  
  
   -Original Message-
   From: u2-users-boun...@listserver.u2ug.org
   [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John
 Woollam
   Sent: Thursday, October 14, 2010 8:59 AM
   To: U2 Users List
   Subject: Re: [U2] how to round to 2 decimals?
  
   Hi
  
   Never heard of the DROUND() function in Universe.
  
   Anyway, why would I want to use a function syntax when I can do
  
   ANS = N1 * N2 'R2' and it is the answer that gets rounded?
   Easy to write.
   Easy to read...
  
   John Woollam  |  Group Function Support 1  (Finance Systems)  |
 Travis
   Perkins PLC  |  01604 682751
  
   -Original Message-
   From: u2-users-boun...@listserver.u2ug.org
   [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry
 Hiscock
   Sent: 14 October 2010 16:49
   To: 'U2 Users List'
   Subject: Re: [U2] how to round to 2 decimals?
  
   Does UniVerse not support the DROUND() function?
  
   -Original Message-
   From: u2-users-boun...@listserver.u2ug.org
   [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John
 Woollam
   Sent: Thursday, October 14, 2010 1:02 AM
   To: U2 Users List
   Subject: Re: [U2] how to round to 2 decimals?
  
   Hi
  
   I've always used 'R2'
  
   e.g. ANS = N1 * N2 'R2'
  
   No scaling, just rounding
  
   Regards
  
   John Woollam  |  Group Function Support 1  (Finance Systems)  |
 Travis
   Perkins PLC  |  01604 682751
   -Original Message-
   From: u2-users-boun...@listserver.u2ug.org
   [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris
 Austin
   Sent: 13 October 2010 22:22
   To: u2-users@listserver.u2ug.org
   Subject: [U2] how to round to 2 decimals?
  
  
   I'm trying to figure out how to round to 2 decimal places with a
   floating point in UniVerse
  
   For example 2596 x 8.333 = 21,632.468
  
   How would you round that in UniVerse to 21,632.47?
  
   Thanks!
  
   ___
   U2-Users mailing list
   U2-Users@listserver.u2ug.org
   http://listserver.u2ug.org/mailman/listinfo/u2-users
  
   html
   head
   meta http-equiv=Content-type content=text/html; charset=UTF-8
   /head
   body
   P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
   style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail
 and
   any
   attachments are confidential and intended solely for the use of the
   addressee
   only. If you have received this message in error, you must not
 copy,
   distribute
   or disclose the contents; please notify the sender immediately and
   delete
   the
   message. /SPAN/P
   P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
   style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message
 is
   attributed to the sender and may not necessarily reflect the view
 of
   Travis
   Perkins plc or its subsidiaries (Travis Perkins). Agreements
 binding

Re: [U2] how to round to 2 decimals?

2010-10-14 Thread Don Robinson
:-)

Yep, no one would notice a half cent!!
 Don Robinson





From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Thu, October 14, 2010 2:07:00 PM
Subject: Re: [U2] how to round to 2 decimals?

so, when the bank rounds everyones bank balances down the cent, the system
would barely pause.maybe noone would noticehmmm.

 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
 boun...@listserver.u2ug.org] On Behalf Of Chris Austin
 Sent: Thursday, October 14, 2010 2:05 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] how to round to 2 decimals?
 
 
 oops.. I should have read your post closer.
 
 ' one million times' - so yeah that wouldn't make a huge difference but
 it's still good to know!
 
 -Chris
 
 
  Date: Thu, 14 Oct 2010 11:00:08 -0700
  From: donr_w...@yahoo.com
  To: u2-users@listserver.u2ug.org
  Subject: Re: [U2] how to round to 2 decimals?
 
  How about this?
 
  X = 2596 * 8.333    ;*  [X will contain 21632.468]
  ANS = INT((X * 100) + .5) / 100
  PRINT ANS
 
 
  The (X * 100) changes X to 2163246.8
  The + .5 changes X to 2163247.3
  The INT() changes X to 2163247
  The / 100 changes X to 21632.47
 
  The output will displays 21632.47
 
  Using a FOR NEXT loop, I run INT((21632.468 * 100) + .5) / 100 and
  the OCONV(21632.468,'MR20') versions one million times and got .84
 seconds for
  the INT version and 4.9 seconds for the OCONV version.
 
  I doubt that 4 seconds would make a difference to most programs but
 every little
  helps.
 
  I also run the OCONV(ICONV(21632.468,'MD2'),'MD2') version and it
 took 5.1
  seconds.
 
  My point: There is more than one way to skin a cat!
 
  Don Robinson
 
 
 
 
 
 
  
  From: Chris Austin cjausti...@hotmail.com
  To: u2-users@listserver.u2ug.org
  Sent: Thu, October 14, 2010 12:34:36 PM
  Subject: Re: [U2] how to round to 2 decimals?
 
 
  Are you sure DROUND() is a UniVerse function?
 
  When I do the following code:
 
  X = 2596 * 8.333
  *
  PRINT DROUND(X,2)
 
  I get the following error:
 
  Array 'DROUND' never dimensioned.
 
 
   From: lar...@wcs-corp.com
   To: u2-users@listserver.u2ug.org
   Date: Thu, 14 Oct 2010 09:25:23 -0700
   Subject: Re: [U2] how to round to 2 decimals?
  
   What's so difficult about ANS = DROUND(N1 * N2, 2) ?
  
  
   -Original Message-
   From: u2-users-boun...@listserver.u2ug.org
   [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John
 Woollam
   Sent: Thursday, October 14, 2010 8:59 AM
   To: U2 Users List
   Subject: Re: [U2] how to round to 2 decimals?
  
   Hi
  
   Never heard of the DROUND() function in Universe.
  
   Anyway, why would I want to use a function syntax when I can do
  
   ANS = N1 * N2 'R2' and it is the answer that gets rounded?
   Easy to write.
   Easy to read...
  
   John Woollam  |  Group Function Support 1  (Finance Systems)  |
 Travis
   Perkins PLC  |  01604 682751
  
   -Original Message-
   From: u2-users-boun...@listserver.u2ug.org
   [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry
 Hiscock
   Sent: 14 October 2010 16:49
   To: 'U2 Users List'
   Subject: Re: [U2] how to round to 2 decimals?
  
   Does UniVerse not support the DROUND() function?
  
   -Original Message-
   From: u2-users-boun...@listserver.u2ug.org
   [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John
 Woollam
   Sent: Thursday, October 14, 2010 1:02 AM
   To: U2 Users List
   Subject: Re: [U2] how to round to 2 decimals?
  
   Hi
  
   I've always used 'R2'
  
   e.g. ANS = N1 * N2 'R2'
  
   No scaling, just rounding
  
   Regards
  
   John Woollam  |  Group Function Support 1  (Finance Systems)  |
 Travis
   Perkins PLC  |  01604 682751
   -Original Message-
   From: u2-users-boun...@listserver.u2ug.org
   [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris
 Austin
   Sent: 13 October 2010 22:22
   To: u2-users@listserver.u2ug.org
   Subject: [U2] how to round to 2 decimals?
  
  
   I'm trying to figure out how to round to 2 decimal places with a
   floating point in UniVerse
  
   For example 2596 x 8.333 = 21,632.468
  
   How would you round that in UniVerse to 21,632.47?
  
   Thanks!
  
   ___
   U2-Users mailing list
   U2-Users@listserver.u2ug.org
   http://listserver.u2ug.org/mailman/listinfo/u2-users
  
   html
   head
   meta http-equiv=Content-type content=text/html; charset=UTF-8
   /head
   body
   P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN
   style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail
 and
   any
   attachments are confidential and intended solely for the use of the
   addressee
   only. If you have received this message in error, you must not
 copy,
   distribute
   or disclose the contents; please notify the sender immediately and
   delete
   the
   message. /SPAN/P
   P style

[U2] how to round to 2 decimals?

2010-10-13 Thread Chris Austin

I'm trying to figure out how to round to 2 decimal places with a floating point 
in UniVerse

For example 2596 x 8.333 = 21,632.468

How would you round that in UniVerse to 21,632.47?

Thanks!
  
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] how to round to 2 decimals?

2010-10-13 Thread Dan Fitzgerald

X=2596 x 8.333
OCONV(X,MR2)
 
 From: cjausti...@hotmail.com
 To: u2-users@listserver.u2ug.org
 Date: Wed, 13 Oct 2010 16:22:04 -0500
 Subject: [U2] how to round to 2 decimals?
 
 
 I'm trying to figure out how to round to 2 decimal places with a floating 
 point in UniVerse
 
 For example 2596 x 8.333 = 21,632.468
 
 How would you round that in UniVerse to 21,632.47?
 
 Thanks!
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
  
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] how to round to 2 decimals?

2010-10-13 Thread Robert Porter
OCONV(X,MD2)
 
 
Robert F. Porter, MCSE, CCNA, ZCE
Lead Sr. Programmer / Analyst
Laboratory Information Services
Ochsner Health System
 
 
 
 
This transmission (including any attachments) may contain confidential 
information, privileged material (including material protected by the 
solicitor-client or other applicable privileges), or constitute non-public 
information. Any use of this information by anyone other than the intended 
recipient is prohibited. If you have received this transmission in error, 
please immediately reply to the sender and delete this information from your 
system. Use, dissemination, distribution, or reproduction of this transmission 
by unintended recipients is not authorized and may be unlawful.


 Chris Austin cjausti...@hotmail.com 10/13/2010 4:22 PM 

I'm trying to figure out how to round to 2 decimal places with a floating point 
in UniVerse

For example 2596 x 8.333 = 21,632.468

How would you round that in UniVerse to 21,632.47?

Thanks!
 
___
U2-Users mailing list
U2-Users@listserver.u2ug.org 
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] how to round to 2 decimals?

2010-10-13 Thread Don P. Nagai
ROUNDED.VALUE = ICONV(ORIGINAL.VALUE,'MD2')

Will convert original to 2163247

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Chris Austin
Sent: Wednesday, October 13, 2010 2:22 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] how to round to 2 decimals?


I'm trying to figure out how to round to 2 decimal places with a floating
point in UniVerse

For example 2596 x 8.333 = 21,632.468

How would you round that in UniVerse to 21,632.47?

Thanks!
  
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] how to round to 2 decimals?

2010-10-13 Thread Kevin King
If the value already has the decimal point in it, MR2 or MD2 will scale the
value as well as round.  If you want to leave the decimal place alone, use:

ROUNDED = OCONV(ORIGINAL.VALUE,'MR20')

Remember that MR2 or MD2 is the same as MR22/MD22, where the first number is
the number of decimals to show and the second digit is the number of
decimals to scale.

-K
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] how to round to 2 decimals?

2010-10-13 Thread Chris Austin

Thanks so much!

X = 2597 * 8.333
PRINT OCONV(X,MR2)
PRINT OCONV(X,MD2)
PRINT OCONV(ICONV(X,'MD2'),'MD2')
PRINT OCONV(X,'MR20')

yields the following:

216.41
216.41
21640.80
21640.80

so basically the 2 that worked are:

OCONV(ICONV(X,'MD2'),'MD2')
OCONV(X,'MR20')

you guys rock! :-)

-Chris


 Date: Wed, 13 Oct 2010 15:37:29 -0600
 From: precisonl...@gmail.com
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] how to round to 2 decimals?
 
 If the value already has the decimal point in it, MR2 or MD2 will scale the
 value as well as round.  If you want to leave the decimal place alone, use:
 
 ROUNDED = OCONV(ORIGINAL.VALUE,'MR20')
 
 Remember that MR2 or MD2 is the same as MR22/MD22, where the first number is
 the number of decimals to show and the second digit is the number of
 decimals to scale.
 
 -K
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
  
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] how to round to 2 decimals?

2010-10-13 Thread Manu Fernandes
Hi,

Use OCONV(21632.468,'MR20')

Manu

 -Message d'origine-
 De : u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
 boun...@listserver.u2ug.org] De la part de Chris Austin
 Envoyé : mercredi 13 octobre 2010 23:22
 À : u2-users@listserver.u2ug.org
 Objet : [U2] how to round to 2 decimals?
 
 
 I'm trying to figure out how to round to 2 decimal places with a floating
 point in UniVerse
 
 For example 2596 x 8.333 = 21,632.468
 
 How would you round that in UniVerse to 21,632.47?
 
 Thanks!
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users