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 the functionality of your current project?
1 Answers IBM, Miles Software,
job locking methods? How can we unlock the job?
How to create a file using vi editor? 2)how to delete a file in vi editor? 3)How to connect the server datastage to unix? what r the command lines we r using? 4)30 jobs r runnig in unix i want to find out my job. how to do this? give me command?
How to manage date conversion in Datastage?
Hi Can any one help regarding below INPUT NAME LOC Ram hyd Ram ban Raj chn Raj Pun Sam del OUPUT NAME LOC Ram Hyd ban Raj chn pun sam del
What is a delta record? How you will read it?
How do u set a default value to a column if the column value is NULL?
how to call routines in stages?
What are the partition techniques available in your last project?
What is container and then types?
Pls tell me what is troubleshooting in datastage view?
How can we improve performance of data stage jobs?