Decimal Question

Jones Allen (Van) Allen.Jones@vpgroup.com
Wed, 27 Feb 2002 09:59:49 -0800


If any of your values can be negative, don't forget to include a character
field for the sign.

-----Original Message-----
From: Pickering, John (NORBORD) [mailto:PICKERIJ@norbord.com]
Sent: Wednesday, February 27, 2002 9:56 AM
To: PowerHouse List (E-mail)
Cc: 'aarnone@grey.com'
Subject: RE: Decimal Question


Bob's answer will give you a right justified and zerofilled result.

Here's one that gives a left justified unfilled result:

>define d-amount char*10 &                         
>  =    ascii(floor(amount of yourfile / 100)) + "." &
>  +    ascii(mod  (amount of yourfile , 100))

Regards,
JWP


> -----Original Message-----
> From:	Edis, Bob [SMTP:BEdis@usbnc.org]
> Sent:	Wednesday, February 27, 2002 12:14 PM
> To:	PowerHouse List (E-mail)
> Subject:	RE: Decimal Question
> 
> Use a float data type (d_famount FLOAT = iamount / 100) to convert value
> to
> an CHAR data type and insert the decimal point (e.g. d_camount CHAR*9 =
> ASCII(iamount,8)[1:6] + '.' + ASCII(iamount,8)[7:2]
> 
> Blue 
> 
> -----Original Message-----
> From: Arnone, Anthony [mailto:aarnone@grey.com]
> Sent: Wednesday, February 27, 2002 10:51 AM
> To: powerh-l@lists.swau.edu
> Subject: Decimal Question
> 
> 
> I have a numeric field called amount that is stored in the database
> without
> the decimal placement. (i.e. $100.00 = 10000) I need to write this field
> to
> a subfile with the nodictionary parameter including the decimal point so
> in
> the file it looks like 100.00. Any Ideas? I am running 8.19 on MPE i/X.
> Also
> can someone explain when I append to a subfile with the nodictionary
> parameter I need to hit the return key for it to process or else it would
> do
> nothing and just hang there.
> 
> 			Anthony
> 
> 

= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.