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

how will u design file watch jobs?

2 Answers  


what is the new version in Datastage ? what is the diff b/t New vesion & 7.5 version?

12 Answers   Wipro,


What are the job parameters?

0 Answers  


What are the partitioning techniques available in link partitioner?

0 Answers  


hi iam new to this tooliam cmpltied to know abt datastage so now iam in project tell me whole step by step what iam doing iwnt to go with exp so plz hlp me pals

0 Answers  


in job of 30 one job is very slow due to this entire job is very slow how can u know which job is slow?

0 Answers   IBM,


Explain datastage architecture?

0 Answers  


What are the functionalities of link collector?

0 Answers  


What is oci?

0 Answers  


how can u handle null values in transformer stage.

7 Answers  


What is the difference between an operational datastage and a data warehouse?

0 Answers  


HOW CAN U DO ERROR HANDLING IN DATA STAGE?

8 Answers   ME,


Categories