Decimal Question
Pickering, John (NORBORD)
PICKERIJ@norbord.com
Wed, 27 Feb 2002 12:55:50 -0500
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
>
>