Formatting a number in PowerHouse - version 8.49.E

Nalder, Jay JNalder at ascprofiles.com
Mon Aug 31 12:24:28 CDT 2009


Try right justifying it into a fixed length field and use subscripting

Define formatted-string char*14 = rj(pipe-delimited-field[1:14]) ; 999,999,999.00
Define amount-string     char*14  = formatted-string[1:3] + formatted-string[5:3] + formatted-string[9:6]
Define amt                          float        = nconvert( amount-string)

Jay Nalder.

From: powerh-l-bounces+jnalder=ascprofiles.com at lists.sowder.com [mailto:powerh-l-bounces+jnalder=ascprofiles.com at lists.sowder.com] On Behalf Of Lowe, Chuck J
Sent: Monday, August 31, 2009 10:04 AM
To: powerh-l at lists.sowder.com
Subject: Formatting a number in PowerHouse - version 8.49.E

I have a file from an outside vendor.  They are sending it pipe delimited "|", There is an amount field that is left justified. Is there anyway to take that character field and convert it to a numeric field without doing INDEX and bit extracts.  Sometimes the field is    123.45 and sometimes 3,123.45.  I thought I could use the FORMATNUMBER function but that is for doing the opposite.

The vendor states they can not send it unformatted.

Thanks in advance.


Chuck Lowe Quest Diagnostics | Sr. Programmer/Analyst,SYS Billing System/Denver| 400 Egypt Rd. | West Norriton, PA 19403 USA | phone 610-650-6679| fax 610-650-2111 |  Chuck.J.Lowe at questdiagnostics.com<mailto:Chuck.J.Lowe at questdiagnostics.com> | www.QuestDiagnostics.com<http://www.questdiagnostics.com/>

Please think about resource conservation before you print this message


------------------------------------------
The contents of this message, together with any attachments, are intended only for the use of the person(s) to which they are addressed and may contain confidential and/or privileged information. Further, any medical information herein is confidential and protected by law. It is unlawful for unauthorized persons to use, review, copy, disclose, or disseminate confidential medical information. If you are not the intended recipient, immediately advise the sender and delete this message and any attachments. Any distribution, or copying of this message, or any attachment, is prohibited.

________________________________


NOTICE - This message and any attached files may contain information that is confidential, legally privileged or proprietary. It is intended only for use by the intended recipient. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, be advised that you have received this message in error. Any dissemination, copying, use or re-transmission of this message or attachment, or the disclosure of any information therein, is strictly forbidden. BlueScope Steel Limited does not represent or guarantee that this message or attachment is free of errors, virus or interference.

If you have received this message in error please notify the sender immediately and delete the message. Any views expressed in this email are not necessarily the views of BlueScope Steel Limited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20090831/a61a1e6b/attachment.htm 


More information about the powerh-l mailing list