This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C1BFC7.0C532FE0 Content-Type: text/plain; charset="iso-8859-1" bzzzt try it with values of (eg) -01 or -10001 Ingemar Olson -----Original Message----- From: Pickering, John (NORBORD) [mailto:PICKERIJ@norbord.com] Sent: February 27, 2002 10:34 To: 'PowerHouse List (E-mail)' Cc: 'KKONEK@thecreek.com' Subject: RE: Decimal Question Kathy (KKONEK@thecreek.com) correctly points out that this won't work when the "cents" part of the results is a single digit. So, one last (hopefully) time, I'll try again: >define d-amount char*10 & > = ascii(floor(amount of yourfile / 100)) + "." & > + ascii(mod(abs(amount of yourfile),100),2) Regards, JWP > -----Original Message----- > From: Pickering, John (NORBORD) > Sent: Wednesday, February 27, 2002 1:15 PM > To: 'Jones Allen (Van)'; PowerHouse List (E-mail) > Subject: RE: Decimal Question > > Correct. > > So I'll revise my suggestion to the following if there value can be > negative: > > >define d-amount char*10 & > > = ascii(floor(amount of yourfile / 100)) + "." & > > + ascii(mod(abs(amount of yourfile),100)) > > Regards, > JWP > > > -----Original Message----- > From: Jones Allen (Van) [SMTP:Allen.Jones@vpgroup.com] > Sent: Wednesday, February 27, 2002 1:04 PM > To: PowerHouse List (E-mail) > Subject: RE: Decimal Question > > Actually the ascii function returns the sign on the left, but you need to > allow for it. > > -----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. ------_=_NextPart_001_01C1BFC7.0C532FE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">RE: Decimal Question bzzzt
try it with values of (eg) -01 or = -10001Ingemar Olson
-----Original Message-----
From: Pickering, John (NORBORD) [mailto:PICKERIJ@norbord.com]
Sent: February 27, 2002 10:34
To: 'PowerHouse List (E-mail)'
Cc: 'KKONEK@thecreek.com'
Subject: RE: Decimal Question
Kathy (KKONEK@thecreek.com) correctly points out that = this won't work when
the "cents" part of the results is a = single digit.So, one last (hopefully) time, I'll try again:
>define d-amount char*10 = & &= nbsp; &= nbsp;
> =3D ascii(floor(amount = of yourfile / 100)) + "." &
> + ascii(mod(abs(amount = of yourfile),100),2)Regards,
JWP> -----Original Message-----
> From: Pickering, John (NORBORD)
> Sent: Wednesday, February 27, 2002 1:15 = PM
> To: 'Jones Allen (Van)'; PowerHouse = List (E-mail)
> Subject: RE: = Decimal Question
>
> Correct.
>
> So I'll revise my suggestion to the following = if there value can be
> negative:
>
> >define d-amount char*10 = & &= nbsp; &= nbsp;
> > =3D = ascii(floor(amount of yourfile / 100)) + "." &
> > + = ascii(mod(abs(amount of yourfile),100))
>
> Regards,
> JWP
>
>
> -----Original Message-----
> From: Jones Allen (Van) = [SMTP:Allen.Jones@vpgroup.com]
> Sent: Wednesday, February 27, 2002 1:04 = PM
> To: PowerHouse List (E-mail)
> Subject: RE: = Decimal Question
>
> Actually the ascii function returns the sign on = the left, but you need to
> allow for it.
>
> -----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 = & &= nbsp; &= nbsp;
> > =3D = 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 =3D = iamount / 100) to convert value
> > to
> > an CHAR data type and insert the decimal = point (e.g. d_camount CHAR*9 =3D
> > 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 =3D = 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
> >
> >
>=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D = =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D
------_=_NextPart_001_01C1BFC7.0C532FE0--
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.