DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
jweir
Participant



Joined: 04 Aug 2010
Posts: 134

Points: 1240

Post Posted: Fri Mar 08, 2019 5:40 am Reply with quote    Back to top    

DataStage® Release: 9x
Job Type: Parallel
OS: Unix
Hi All,

I am having trouble putting double quotes around a field when writing to a sequential file when the field contains a comma. The file itself is a CSV. So if the field does not contain a comma within it, it shouldn't be enclosed within double quotes, but when the field does contain a comma, it should be.

Thanks in advance.

_________________
Jweir

--- If strength were all, tiger would not fear scorpion.
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42896
Location: Denver, CO
Points: 221168

Post Posted: Sat Mar 09, 2019 3:08 am Reply with quote    Back to top    

So... this is a DataStage question? As in you're having this issue with the Sequential File stage in a parallel job? Just wanted to double-check since the question was pretty generic. In any case, I am wondering why you are worried about the quotes, specifically the need to only have them when there's a comma in the data. Would having them there all the time cause a problem? It doesn't really seem like something to me that you should be worried about.

The only other clarification would be the "contains a comma" statement. Not could contain but actually does contain, as in a record by record check of the actual data? One record might have quotes around field X while the next record may not, in other words. Perhaps over-thinking things a bit this morning but looking to define the scope of the issue if we move forward with it.

_________________
-craig

The Old Ones were, the Old Ones are, and the Old Ones shall be. Not in the spaces we know, but between them. They walk serene and primal, undimensioned and to us unseen.
Rate this response:  
Not yet rated
mouthou
Participant



Joined: 04 Jul 2004
Posts: 191

Points: 1847

Post Posted: Mon Mar 11, 2019 11:27 pm Reply with quote    Back to top    

Question/scenario makes the brain to wander a little bit! In future, putting some sample input and expected output will help.

Is this your clarification on when the quotes will be put by DataStage. Are you creating the file by using SeqFile stage in which you will get quotes for all fields and not face the particular issue which you explained?
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours