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



Joined: 10 Jan 2013
Posts: 2

Points: 29

Post Posted: Sun Apr 14, 2019 6:37 pm Reply with quote    Back to top    

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

I'm trying to write an XML using DS and ive managed to create all the repeated elements using key and trigger columns;Special thanks to Ernie on his posts about xml. Now i need to add header and footer outside of the element tag and these should have free form text that is of CDATA. (ex: <Header>
<![CDATA[ message ]]>
</Header>

I've found a post that tells me use hash files and a lookup to use, however as I'm using 11.5 is there an alternative to this?


Also, how do we get this free form text tag <![CDATA[ message ]] using Datastage xsd. I've changed the datatype to char and dataelement type as xml but not able to achieve this

For every column description, my fields have /root/<elementtagname>/<columnname>/text() -- So, for achieving CDATA , is there any specific datatype that I need to use or somefeature that I'm missing

Thanks in advance


kaasko

_________________
Regards


THE KAASKO!
chulett

Premium Poster


since January 2006

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

Joined: 12 Nov 2002
Posts: 42923
Location: Denver, CO
Points: 221366

Post Posted: Sun Apr 14, 2019 8:10 pm Reply with quote    Back to top    

kaasko wrote:
I've found a post that tells me use hash files and a lookup to use, however as I'm using 11.5 is there an alternative to this?

Welcome!

What you found was (I assume) a very old post but your issue isn't the version as it's still a perfectly valid solution. Instead, it was for Server jobs and (again, I assume) you are only looking for a Parallel solution. Ernie is still The Man when it comes to XML discussions here, hopefully he'll be able to pop in and help out. I'm sure someone will. I never had a chance to use the new PX XML stages before I moved on, so can't help there. Sad

_________________
-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
eostic

Premium Poster



Group memberships:
Premium Members

Joined: 17 Oct 2005
Posts: 3813

Points: 30674

Post Posted: Mon Apr 15, 2019 7:34 pm Reply with quote    Back to top    

Thank you for the kind words. Glad these resources have been helpful. I havent done cdata stuff in awhile, but recall researching this in depth and concluding that it cant be done with the hierarchical stage.....needing still the xmlOutput Stage....which, for subtle reasons like this, is still fully supported.

Also, if you dont have high volumes, use Server. It is far superior to EE for handling low volume xml because it loves variable text, which is what all xml essentially is.

_________________
Ernie Ostic

blogit!
Open IGC is Here!
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

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

Joined: 12 Nov 2002
Posts: 42923
Location: Denver, CO
Points: 221366

Post Posted: Mon Apr 15, 2019 7:40 pm Reply with quote    Back to top    

... and when he says "high volumes" he means HIGH volumes. We worked with pretty dang huge volumes of XML data back in the day using Server jobs for consumption by various search engines. Ah, those were the days when Server jobs weren't... pariah. Crying or Very sad

_________________
-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
kaasko
Participant



Joined: 10 Jan 2013
Posts: 2

Points: 29

Post Posted: Tue Apr 16, 2019 10:52 pm Reply with quote    Back to top    

Thankyou so much for the inputs and for the welcome(i've only been a stalker in this forum for years and has been my first post officially Razz).. and haha I do miss those server job days. But unfortunately I'm dealing with banks data Shocked Shocked and yes HIGH VOLUMES.

I've managed to hardcode the ''CDATA xyzzz " as string thru transformer and in xml output stage - i've defined this column as xml element . And the entire string is adjusted to ---[[CDATA ]] --- with the blue tags as required.

Now , I've an another issue with the tags - i've non repetive columns in my output records - and each run is appending all the tags(including parent tags and child) multiple times as many as the records are there. Is there a way where I can group the child tags into one parent tag.


Cheers
kaasko

_________________
Regards


THE KAASKO!
Rate this response:  
Not yet rated
eostic

Premium Poster



Group memberships:
Premium Members

Joined: 17 Oct 2005
Posts: 3813

Points: 30674

Post Posted: Wed Apr 17, 2019 4:53 pm Reply with quote    Back to top    

I can imagine some possibilities, but there is too much room for interpretation. Can you describe the issue in a bit more detail? ...perhaps outline some of the resulting xml you are seeing and what ...

_________________
Ernie Ostic

blogit!
Open IGC is Here!
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