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 |
I/P --- ID Value 1 AB 2 ABC 3 ADE 4 A O/p --- ID Value 1 A 1 B 2 A 2 B 2 C 3 A 3 D 3 E 4 A
Is it possible to implement parallelism in Mainframe Jobs ? If Yes how ? If no why ?
What is the version control how can i apply this in DataStage can any one tell me the anser
How do you register plug-ins?
A flatfile contains 200 records.I want to load first 50 records at first time running the job,second 50 records at second time running and so on,how u can develop the job?pls give the steps?
How can you join flat file, oracle as a sources?
Why fact table is in normal form?
explain about citrix scheduling tool in datastage
create a job that splits the data in the Jobs.txt file into four output files. You will direct the data to the different output files using constraints. • Job name: JobLevels • Source file: Jobs.txt • Target file 1: LowLevelJobs.txt − min_lvl between 0 and 25 inclusive. − Same column types and headings as Jobs.txt. − Include column names in the first line of the output file. − Job description column should be preceded by the string “Job Title:” and embedded within square brackets. For example, if the job description is “Designer”, the derived value is: “Job Title: [Designer]”. • Target file 2: MidLevelJobs.txt − min_lvl between 26 and 100 inclusive. − Same format and derivations as Target file 1. • Target file 3: HighLevelJobs.txt − min_lvl between 101 and 500 inclusive. − Same format and derivations as Target file 1. • Rejects file: JobRejects.txt − min_lvl is out of range, i.e., below 0 or above 500. − This file has only two columns: job_id and reject_desc. − reject_desc is a variable-length text field, maximum length 100. It should contain a string of the form: “Level out of range: <min_lvl>”, where <min_lvl> is the value in the min_lvl field. My Question is how do you write the stage variable for reject rows.
If we take 2 tables(like emp and dept),we use join stage and how to improve the performance?
I have the following columns in the EMP table Empid,Empname,Sal,month(Sal),year(Sal) and DOB(let us say the dob is 15th-Jan-1981) Desing a job such that the output contains the following empname,year(sal),tot(sal) and current age i.e. whether 18yrs or so on
What is Horizontal transformation, vertical transformation,diagonal transformation?