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 |
How to write a expression to display the first letter in Caps in each word using transformer stage ? Please let me know ASAP Thanks in advance...
0 Answers Alpharithm Technologies,
WHAT ARE PERFORMANACE SETTINGS YOU HAVE IMPLEMENTES IN YOUR PROJECT?
what is sparse lookup?
Different ways a project can be moved to production ?...example ….export-import and Version control.
How can we read latest records in a text file named file1.txt using seq file stage only? file1 having 100 records in that 5 record sare latest records.How can we read that latest records?
how can we join one oracle & flat files ?
how to sort two columns in single job in datastage.
Is there no issue when you try to convert a NOt null column in nullable and vice versa in aggregator styage and transformer stage? When I tried i got the warnings but in a running code I can see such type of scenarios. Please explain
What is a merge in datastage?
there are two schemas x and y are there. some data is in x schema. i want to use that in y schema..how can i use? please give some possibilities
What is a ds designer?
What is the difference between SQl Loader and OCI in datastage?