How to remove ctrl M or(^M) characters in file using Sequential File stage?
Answers were Sorted based on User's Feedback
Answer / subbuchamala
1) In Sequential file, we have an option like 'filter'.
in the filter we can mention like:
sed 's/\^M//g' FileName.txt
or
2) we can do this in Before job routine(executeSH) and we can cal this in Seq file stage. here we can use UNIX command 'unix2dos fileName.txt'
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / subhash (subbuchamala)
We can use these ways also to remove Control M Characters
tr -d '\r' < yourfile.txt > yourfile1.txt
mv yourfile1.txt yourfile.txt
or
Change the line terminator in Sequential File stage from
UNIX-style to DOS-style(it's a stage property).
| Is This Answer Correct ? | 3 Yes | 0 No |
explain about citrix scheduling tool in datastage
What are operators in datastage?
How can we do null handling in sequential files
wt is the difference between swith and filter stage
how to implement scd2 in datastage 7.5 with lookup stage
Hai..,This is Kiran M. What is D/B Change Capture stage and Difference stage?
In merge stage can we update the values?
Where do the datastage jobs get stored?
source file is having 5 records while moving into target it want to be 10 records
What are stage variables?
what is the function in Transformer stage can act as Rank function in Oracle
how to clear the source file? 2) diff b/t odbc & Oracle?what is node? 3) explain one complex job u face in ur project