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 |
What are the various kinds of containers available in datastage?
Differentiate between Join, Merge and Lookup stage?
Hi Vijay here For Four CPU's how many nodes will required?
what is the difference between INROWNUM AND OUTROWNUM IN DATASTAGE SERVER EDITION?
hi my source is:: empno,deptno,salary 1, 10, 3.5 2, 20, 8 2, 10, 4.5 1, 30, 5 3, 10, 6 3, 20, 4 1, 20, 9 then target should be in below form... empno,max(salary),min(salary),deptno 1, 9, 3.5, 20 2, 8, 4.5, 20 3, 6, 4, 10 can anyone give data flow in data stage for the above scenario.... thanks in advance...
guys pls tell me where we use sequence jobs exactly in realtime proj explain pls with example.
detail about sdlc
What is difference between join, merge and lookup stage?
What are the steps required to kill the job in Datastage?
Give an idea of system variables.
Is it possible to query a hash file?
HOW CAN U DO ERROR HANDLING IN DATA STAGE?