Hi All,
I have created a generic job which reads the data from Teradata and creates a flat file.
The SQL i am placing in a file in unix and passing as a parameter to parallel job.
For the decimal columns in flat files, the values are starting with one blank space followed by decimal value.
Example:
"TRANS_NBR","ORDER_CUST_NBR","COST_AMOUNT"
"640124860","159884569"," 0000001.55"
Could you please help me how can i avoid space.
Regards,
Aks
Decimal conversion
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 17
- Joined: Tue Jan 25, 2011 5:24 am
- Location: Bangalore
It's a placeholder for the sign, space means a positive value. Does it actually hurt, cause an issue? My understanding is if you need to get rid of the space, you'd need to make the flat file target field a string. Or there may be an extended property to tell it that it is not signed. Not positive. No pun intended.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 17
- Joined: Tue Jan 25, 2011 5:24 am
- Location: Bangalore
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You could use a Filter in your Sequential File stage to convert any instances of '" ' (double quote followed by space) into '"' (double quote not followed by space). Use a command such as sed or awk.
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.
-
- Participant
- Posts: 17
- Joined: Tue Jan 25, 2011 5:24 am
- Location: Bangalore
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Well, no, you could use an after-job subroutine that invokes ExecSH to post-process the file or, if you are running the job from a sequence, a downstream Execute Command activity.
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.