On Thursday, 9 August 2012 20:47:25 UTC-4, Charlie Noah wrote:
>
> I know I'm dense some days, but I can't seem to figure this one out. I
> am processing money data which comes in OCONVed. When I ICONV it I run into
> trouble with negative amounts when dollar signs and commas are involved.
> This is what I've tested (MR returns the same result as MD):
>
I don't think that a single conversion code will do it. You'll either need
multiple ICONV statements, or you can use a single ICONV statement with
multiple conversion codes, separated by value marks.
For example, to strip out the "$" sign, use character replacement (MCC;X;Y)
I can't remember if jBASE has constants such as @VM for a value mark, so
I'll just code it with the actual value mark character in the following
example.
VALUE = ICONV("$-1,000.00","MCC;$;]MD2")
--
Kevin Powick
--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.
To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en