Need to reject only junk values
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Do you have authority from the data owner arbitrarily to delete some of the characters in their data? (There are no "junk" characters.)
If the data owner needs to have particular characters removed, the "double Convert()" technique is recommended. Otherwise you have to work out how to process them.
If the data owner needs to have particular characters removed, the "double Convert()" technique is recommended. Otherwise you have to work out how to process them.
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.
Re: Need to reject only junk values
open the file in vi editor,then type
:%s/^M//g
(To enter ^M, type CTRL+V, then CTRL+M)
This will remove the junk control M characters if it is present.
Then you can process the data in datastage
:%s/^M//g
(To enter ^M, type CTRL+V, then CTRL+M)
This will remove the junk control M characters if it is present.
Then you can process the data in datastage
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
OK, here's how I would go about this provided I had my customer's imprimatur. Create a stage variable containing the characters you want to keep. Use the "double Convert" technique to remove all the others.
Code: Select all
Convert(Convert(svKeepChars, "", InLink.TheString), "", InLink.TheString)
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: 23
- Joined: Tue May 14, 2013 6:34 am