Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I avoid trim operation 2

Status
Not open for further replies.

taou

IS-IT--Management
Jun 29, 2004
5
US
Hi,
I was unable to read a file from mainframe application,there was some problem related to quote charector(the source data is very curropted without any consistancy example1: 'JAC LYNN'S INC' , example2: "'maryan corp'.*").I was able to read the file at the input seq file (I did check the delimeter and quote charector they where same)but the data at o/p side was enclosed in '....'(single qotations). I was able to remove this single qotations by performing trimming at o/p.It shall be greatly appreciated if anyone can tell me how do I overcome this issue with in datastage without using the trim operations as I am dealing with huge multiple tables with 40-80 columns and its almost 20 years of data and I cannot ask the guys at source to do it at there side.

thanks
 
Im not 100% sure I understand what the problem is.....if the problem is that each field in the datastage output file is enclosed in ' characters, why don't you set the properties of the output file stage to not use quote characters?

If I have misinterpreted the problem, let me know.
 
thanks "J" for that tip and valuable time. some times we miss simple things and land in lala land. Any way here is my doubt; will it not effect the job and a conflict with metadata if we say the tool not to use quote charectors.
 
It really depends what your data is like. If you are trying to output your data to a comma-delimited file and some of your fields contain commas that you havent trimmed out, then you would need to use the quotes in both your input and output files to stop your fields getting misaligned, but it really depends what you want as output - I use datastage mainly for data conversion, to create text files that will be loaded into new systems, and in this case, the quote character isnt required (so you just use 000 in the quote character field).
 
thanks that sounds good enough.
,N did you read my point about ora bulk and did you face such a problem with any databases.

thanks


There is someone in this world for you worth loosing everything for
 
Hey, I did read your point about the ora bulk, but I havent ever had to use datastage to load into oracle, so I can't help you out - sorry!

J
 
Alternate solution: Use DS TX, it has a number of functions to allow you to read in the data as a blob and SUBSITUTE and use escape characters etc.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top