Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.
Moderators: chulett , rschirm , roy
mayura
Participant
Posts: 40 Joined: Fri Aug 01, 2008 5:58 am
Location: Mumbai
Post
by mayura » Fri Aug 13, 2010 5:16 am
Hi,
We can remove the control m or special characters in UNIX scripts.. but
is there any way to remove the special characters coming in flat files from Datastage jobs?
Mayura
ArndW
Participant
Posts: 16318 Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:
Post
by ArndW » Fri Aug 13, 2010 5:51 am
Yes, there are various ways and which method is used depends upon how you read the files. Are the Control-M characters in strings in the job? If yes, then a simple Convert(Char(13),'',In.ColumnName) will do the trick.
sagar deshmukh
Participant
Posts: 103 Joined: Fri Jan 18, 2008 12:55 am
Location: chennai
Post
by sagar deshmukh » Fri Aug 13, 2010 5:54 am
You can use Tr command to remove control M character... in the before job subroutine....
You have to design your job accordingly
Sainath.Srinivasan
Participant
Posts: 3337 Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom
Post
by Sainath.Srinivasan » Fri Aug 13, 2010 6:16 am
If ^M is at the end of the record, it may be due to DOS type record termination. Setting this property will handle it properly.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Fri Aug 13, 2010 6:24 am
Sainath.Srinivasan wrote: If ^M is at the end of the record, it may be due to DOS type record termination. Setting this property will handle it properly.
This, typically. But as Arnd noted there are various ways so it really depends on the where and the what of it.
-craig
"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Fri Aug 13, 2010 6:25 am
I expect you will end up setting the Record Delimiter String property to "DOS style".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Posts: 5227 Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:
Post
by kduke » Fri Aug 13, 2010 8:58 am
FTP will also get rid of these if you transfer ascii instead of binary.
Mamu Kim
mayura
Participant
Posts: 40 Joined: Fri Aug 01, 2008 5:58 am
Location: Mumbai
Post
by mayura » Thu Aug 19, 2010 3:19 am
kduke wrote: FTP will also get rid of these if you transfer ascii instead of binary. ...
ok will try this and let u all know...
between thanks.. but keep posting new ideas for the same
Mayura
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Thu Aug 19, 2010 5:29 am
Looks like plenty of ideas here already, you need to go implement now and let us know how things turn out.
-craig
"You can never have too many knives" -- Logan Nine Fingers