Reading decimal values in schema files
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 288
- Joined: Tue May 27, 2008 3:42 am
- Location: Luxembourg
Reading decimal values in schema files
Morning / Afternoon / Evening all
I'm going to bore you guys once again with the infamous schema file. Just when I thought I was getting the hang of it, voila, Datastage has just thrown me a curve ball.
I basically have decimal values of 20 significant digits including 9 decimal places which I'm reading with a decimal[20,9] specification. However my actual data contains a thousands' separator which is a space. So 1299.789987789 in my flat file becomes 1 299.789987789
Thus when I read this value I get 1.
Is there any way I could instruct Datastage about the thousands' separator?
Thanks guys
Tony
I'm going to bore you guys once again with the infamous schema file. Just when I thought I was getting the hang of it, voila, Datastage has just thrown me a curve ball.
I basically have decimal values of 20 significant digits including 9 decimal places which I'm reading with a decimal[20,9] specification. However my actual data contains a thousands' separator which is a space. So 1299.789987789 in my flat file becomes 1 299.789987789
Thus when I read this value I get 1.
Is there any way I could instruct Datastage about the thousands' separator?
Thanks guys
Tony
Tony
BI Consultant - Datastage
BI Consultant - Datastage
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You're in France, using a French locale, which specifies space as the thousands delimiter and comma as the decimal placeholder (which is correct for France). You can change this easily by changing the NLS locale used by that job.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 288
- Joined: Tue May 27, 2008 3:42 am
- Location: Luxembourg
-
- Premium Member
- Posts: 288
- Joined: Tue May 27, 2008 3:42 am
- Location: Luxembourg
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You didn't ask another question. I assumed that
Bonne chance!
was a statement of intent.TonyInFrance wrote:I guess I need to define an NLS locale just to signify a thousands' separator.
Bonne chance!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 288
- Joined: Tue May 27, 2008 3:42 am
- Location: Luxembourg
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Take a look at what's specified in the fr_FR locale. You may need to create a custom locale definition.
Otherwise read the field as VarChar and use Convert() function to change the delimiter characters.
Otherwise read the field as VarChar and use Convert() function to change the delimiter characters.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 288
- Joined: Tue May 27, 2008 3:42 am
- Location: Luxembourg