Comma or decimal point

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
shrek7577
Participant
Posts: 62
Joined: Thu Sep 28, 2006 6:53 am
Location: France, Paris

Comma or decimal point

Post by shrek7577 »

Hi,

Our DS server/client version is 7.1r1

All our input file are in CSV format (; as separator).

They are generated by excel (french version) which put ',' for decimal number and sometimes with spaces.

But, in datastage, decimal must be with comma '.'

So, for all decimal derivations, I'va to use TRIM, CHANGE, ...

Do it exist some parameters in DS to solve this problem ? NLS ?

Thanks.
asitagrawal
Premium Member
Premium Member
Posts: 273
Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto

Re: Comma or decimal point

Post by asitagrawal »

Use Float as the data type, instead of decimal.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Try to customize you own data element.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you have NLS enabled for DataStage, do the following in the Transformer stage.
  • Use ExecUV as a before-stage subroutine to execute the command SET.LOCALE NUMERIC FR-FRENCH

    Use ExecUV as an after-stage subroutine to execute the command RESTORE.LOCALE
Then DataStage will automatically recognize the French convention for thousands delimiter (space) and decimal placeholder (comma).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shrek7577
Participant
Posts: 62
Joined: Thu Sep 28, 2006 6:53 am
Location: France, Paris

Post by shrek7577 »

Thanks a lot !
I replace Decimal Type by Float for the decimal and it work perfectly (with Oracle 9i plugin)
:D
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Its nice that you resolved that but Ray's suggestion is worth giving a try.

Sam
shrek7577
Participant
Posts: 62
Joined: Thu Sep 28, 2006 6:53 am
Location: France, Paris

Post by shrek7577 »

hi us1aslam1us and ray.wurlod,

ok, i save this page in my pc and will try it later.

Thanks.
Post Reply