Page 2 of 2

Posted: Mon Feb 12, 2007 3:20 pm
by ray.wurlod
If you're in a server job you can use Iconv(thevalue, "MDn") where n is the number of decimal places. This function handles signs at either end of the value.

Posted: Mon Feb 12, 2007 3:50 pm
by a2love
Those were all very good ideas. In the end the Iconv() worked very very easily.

Thank you all for your help I really appreciate it! This message board will be getting some good recommendations from me :).

Cheers,
Adam Love

Posted: Mon Feb 12, 2007 4:43 pm
by ArndW
A2love - I hate to have to post this at the end of the thread; but you stated you had an EE job; and ICONV() won't work in one unless you call up a BASIC transform stage. :?

Posted: Thu Sep 11, 2008 1:19 am
by Gazelle
The complication I had was that the Amount was the final column in the delimited sequential file.
eg.
ORDERA,ITEMA,12345.67-
ORDERA,ITEMB,98765.43

When defining the Amount column as a decimal (with "packed=no" and "sign position=trailing"), the row was dropped with the message in the log:
SF_ReadPayment,0: Field "AMOUNT" with 'delim=end' did not consume entire input, at offset: 99


Because this is an adhoc throw-away job, I read the column in as a Varchar and used DSguru2B's "string manipulation" method.

However, it would've been nicer if it could've been handled in the read stage.