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 is the precedence of stage variables,derivations, and constraints?
What is datastage engine?
1)s.key generate 1 to 700 records today. tomorrow another 400 will updated how to update the records using s.key generator? 2)source is like :-- DB --> T/F stage1 --> seq1file T/f 1 is linking with T/F2 ---> seq 2 how to load the data? in source i given some conditions those r going in seq1. The another data will going to seq2 how to do this ?
Hi, Please tell me how to solve this scenario in datastage ? Here we have 3 columns in a table TEST CODE,ENTRY DATE and BATCH The table looks like CODE ENTRYDATE BATCH 100 100716 1 100 100716 1 100 100716 1 200 122517 2 200 122517 2 302 555555 8 302 555555 8 302 555555 8 We need to create a seqno on grouping these 3 columns. The result should be like this. CODE ENTRYDATE BATCH SEQNO 100 100716 1 1 100 100716 1 2 100 100716 1 3 200 122517 2 1 200 122517 2 2 302 555555 8 1 302 555555 8 2 302 555555 8 3
1 Answers Alpharithm Technologies,
why we use hash file for lookup?
Describe the main features of datastage?
If we take 2 tables(like emp and dept),we use join stage and how to improve the performance?
Is it possible to query a hash file?
Triggers,VIEW,Procedures
What is ds designer?
What is difference between server jobs & parallel jobs?
how to clear the source file? 2) diff b/t odbc & Oracle?what is node? 3) explain one complex job u face in ur project