Need to handle new line termination for a field
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 24
- Joined: Mon Jul 14, 2008 12:03 am
- Location: Bangalore
Need to handle new line termination for a field
Please let me know the Equivalent property for 'contains terminators' (Column property in server) in parallel job.
Thanks & Regards
Rahul
Thanks & Regards
Rahul
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Need to handle new line termination for a field
There isn't one.Rahul Bharadwaj wrote:Please let me know the Equivalent property for 'contains terminators' (Column property in server) in parallel 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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The parallel Sequential File stage is notorious for not being able to handle embedded newlines. This is not pedantry - search back through the myriad posts complaining about it.
Note that simplistic "solutions" such as using a shell script to delete the new lines don't cut it for me - I believe the customer's data is sacrosanct - if these newline characters are part of the data, then (lacking advice to the contrary) they're part of the data and must be handled accordingly.
My workaround, as often as not, has been to put a server Sequential File stage into a server Shared Container and to embed that in the parallel job.
Note that simplistic "solutions" such as using a shell script to delete the new lines don't cut it for me - I believe the customer's data is sacrosanct - if these newline characters are part of the data, then (lacking advice to the contrary) they're part of the data and must be handled accordingly.
My workaround, as often as not, has been to put a server Sequential File stage into a server Shared Container and to embed that in the parallel 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.
I recall issues with embedded quotes but thought there was some sort of equivalent for this in the PX Sequential File stage, guess I thunk wrong.
For those of you who have faced and overcome this issue, what solution did you architect? What was your 'work around'?
Ah... I see Ray added his while I was typing. Thanks!
For those of you who have faced and overcome this issue, what solution did you architect? What was your 'work around'?
Ah... I see Ray added his while I was typing. Thanks!
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 24
- Joined: Mon Jul 14, 2008 12:03 am
- Location: Bangalore
Thank you ray
Thanks Ray, I overcomed this situation by using server shared containers in parallel job. Thank you.
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
We have address processing and its a big junkyard..... had single and double quotes as part of data and we had to use extended ascii characters to quote all fields.
Never had newline characters, the front end guys need to understand its no sense in capturing carriage return and new line charactes as part of any textual descriptions.
Never had newline characters, the front end guys need to understand its no sense in capturing carriage return and new line charactes as part of any textual descriptions.
- Zulfi
broken address
Hi Guys,
I tried this solution tp load the address data which is broken into 2 lines. I was able to view the data in shared container/sequential file stage, but while loading it into the table (from a parallel job) it is still loading 2 records for one address. How do i remove that new line character(a square box ) from the output? ereplace didn't work for me, its not compiling!
Appreciate your suggestions!
I tried this solution tp load the address data which is broken into 2 lines. I was able to view the data in shared container/sequential file stage, but while loading it into the table (from a parallel job) it is still loading 2 records for one address. How do i remove that new line character(a square box ) from the output? ereplace didn't work for me, its not compiling!
Appreciate your suggestions!
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Can you please post what the "resolution" is?
My point made earlier is that you should NOT remove the newline, at least not without the customer's approval - it's part of the data. So you have to find a mechanism for loading the data in which any character is legitimate. I suspect you've used a bulk loader, which has interpreted the end-of-line in its own way.
My point made earlier is that you should NOT remove the newline, at least not without the customer's approval - it's part of the data. So you have to find a mechanism for loading the data in which any character is legitimate. I suspect you've used a bulk loader, which has interpreted the end-of-line in its own way.
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.