Remove new line character from modify stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 14
- Joined: Wed Jul 25, 2012 5:29 am
- Location: Mumbai
Remove new line character from modify stage
Hi,
I am using modify stage in a multiinstance job.Now in one field of the input file I get a new line character. For example - suppose the field name is 'ADDRESS1' and the data is populating like 'SOUDI ARAB'.
Now in between SOUDI and ARAB there is a new line character(not space).For that we are not getting correct data in output.
Now my question is how can we remove or trim new line character from modify stage.
I am using modify stage in a multiinstance job.Now in one field of the input file I get a new line character. For example - suppose the field name is 'ADDRESS1' and the data is populating like 'SOUDI ARAB'.
Now in between SOUDI and ARAB there is a new line character(not space).For that we are not getting correct data in output.
Now my question is how can we remove or trim new line character from modify stage.
Sagnik
I have to admit that I use the modify stage less and less over time. There is no reason not to use a transform stage and the CONVERT() function to solve this problem.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 14
- Joined: Wed Jul 25, 2012 5:29 am
- Location: Mumbai
In this case multi-instance jobs play no role.
If you can do it in a modify stage, then you can do it in a transform stage. Is the column name in question a known one or are you passing the name in as a parameter?
If you can do it in a modify stage, then you can do it in a transform stage. Is the column name in question a known one or are you passing the name in as a parameter?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 14
- Joined: Wed Jul 25, 2012 5:29 am
- Location: Mumbai
Sorry for my late reply.
Now I am using this :
AD_LINE_1_TX:string[max=40]=string_trim(AD_LINE_1_TX,"\n");
where AD_LINE_1_TX is th column name.
But it gives an error.
main_program: Error parsing modify adapter: Error in binding: Expected ')', got: ","
Expected destination field selector, got: ")"; input:
drop D,TS1,TS2,TS3,TS4,TIMESTAMP1,DATE1;MER_STRT_DT=D1;MER_END_DT=D2;AD_LINE_1_TX:string[max=40]=string_trim(AD_LINE_1_TX,"
");[/b]NOWARN
please suggest..
Now I am using this :
AD_LINE_1_TX:string[max=40]=string_trim(AD_LINE_1_TX,"\n");
where AD_LINE_1_TX is th column name.
But it gives an error.
main_program: Error parsing modify adapter: Error in binding: Expected ')', got: ","
Expected destination field selector, got: ")"; input:
drop D,TS1,TS2,TS3,TS4,TIMESTAMP1,DATE1;MER_STRT_DT=D1;MER_END_DT=D2;AD_LINE_1_TX:string[max=40]=string_trim(AD_LINE_1_TX,"
");[/b]NOWARN
please suggest..
Sagnik
-
- Participant
- Posts: 14
- Joined: Wed Jul 25, 2012 5:29 am
- Location: Mumbai
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
So you didn't really need to send me a PM asking me to look at this.
I do not spend 24/7 logged in to DSXchange. Indeed, I probably only devote about 1 hour per day, maybe less on weekends.
I do not spend 24/7 logged in to DSXchange. Indeed, I probably only devote about 1 hour per day, maybe less on weekends.
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.