How to remove ctrl M or(^M) characters in file using Sequential File stage?

Answers were Sorted based on User's Feedback



How to remove ctrl M or(^M) characters in file using Sequential File stage?..

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

How to remove ctrl M or(^M) characters in file using Sequential File stage?..

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

Post New Answer

More Data Stage Interview Questions

What are the various kinds of containers available in datastage?

0 Answers  


Differentiate between Join, Merge and Lookup stage?

0 Answers  


Hi Vijay here For Four CPU's how many nodes will required?

4 Answers   TCS,


what is the difference between INROWNUM AND OUTROWNUM IN DATASTAGE SERVER EDITION?

2 Answers  


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...

5 Answers  


guys pls tell me where we use sequence jobs exactly in realtime proj explain pls with example.

2 Answers   TCS,


detail about sdlc

4 Answers  


What is difference between join, merge and lookup stage?

0 Answers  


What are the steps required to kill the job in Datastage?

0 Answers  


Give an idea of system variables.

0 Answers  


Is it possible to query a hash file?

0 Answers   IBM,


HOW CAN U DO ERROR HANDLING IN DATA STAGE?

8 Answers   ME,


Categories