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



Joined: 03 Apr 2012
Posts: 10

Points: 83

Post Posted: Thu Apr 07, 2016 5:46 am Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: Server
OS: Windows
Dear All ,
I am very new to datastage.
I got a requirement to create a proof of concept job which will read data from sequential file and generate a single XML file , which will contain all data coming from sequential file.

Column format for sequential file
ID Numeric
Name Varchar
Age Numeric

Note : Possibility to have XSD in place , but output should be in single XML
file.

Requesting for your guidance , how to build a simple job for this requirement.

Regards,
Subhasis
chulett

Premium Poster


since January 2006

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

Joined: 12 Nov 2002
Posts: 42320
Location: Denver, CO
Points: 217325

Post Posted: Thu Apr 07, 2016 5:55 am Reply with quote    Back to top    

So... very new to DataStage, how about XML? Is that something you are familiar with or are you very new to that as well?

And you really should have the xsd for this, it is used to generate the metadata needed to produce the output XML.

Lastly, will this really be a Server job as marked? I'd also be curious what your specific version is, 8.what?

_________________
-craig

Watch out where the huskies go and don't you eat that yellow snow
Rate this response:  
Not yet rated
Abhijeet1980
Participant



Joined: 15 Aug 2006
Posts: 81
Location: Zürich
Points: 671

Post Posted: Thu Sep 15, 2016 7:31 am Reply with quote    Back to top    

I can share my way of doing something similar.

XML stage from Data Stage could not help me much, owing to sheer volume of data being transformed within the ETL job. Moreover, there were several XML files being created in the output directory. The only good thing about the XML stage is the dynamic way of XML generation using XSD.

I resorted, therefore, to using Sequential file stage to create a XML file (I wanted to create IDOC's for SAP SD i.e. Sales Orders would then get generated, which could then be easily read into SAP ERP without any further conversion; all in one file).

Solution employed was to beautifully/intelligently insert strings (essentially XML tags) based on conditions evaluated in the Data Stage transformer.

All this was done using Data Stage server edition 8.1. Off course, no XSD was employed and the beauty was only the logic (Note. XSD eqvt employed using a Static logic) inside the in ETL transformer. Downside of this would mean, a reprogramming/changing the ETL job and editing the logic inside ETL transformer.

Hope, you can try something of this sort for your POC.

Cheers, Abhijit
Rate this response:  
Not yet rated
UCDI



Group memberships:
Premium Members

Joined: 21 Mar 2016
Posts: 279

Points: 2784

Post Posted: Thu Sep 15, 2016 8:27 am Reply with quote    Back to top    

I highly recommend if you can to use the hierarchical stage to write the XML instead of trying to cook it up in a flat file. Its doable, of course, as xml is only text and sequential files are only text and datastage can write text but this stage was designed for the purpose and has some ability to use schemas and do more complex xml things.

I am not sure if this is available in your version, if not there are some older xml stages that might work on older versions of DS.

The H-stage is complex to learn but very worthwhile if you have it and want to try it. Very powerful.
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

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

Joined: 23 Oct 2002
Posts: 54085
Location: Sydney, Australia
Points: 293335

Post Posted: Thu Sep 15, 2016 5:04 pm Reply with quote    Back to top    

UCDI wrote:
I highly recommend if you can to use the hierarchical stage

The Hierarchical Data stage is not available in version 8.

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
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: 42320
Location: Denver, CO
Points: 217325

Post Posted: Thu Sep 15, 2016 7:01 pm Reply with quote    Back to top    

And, from what I understand, not usable in a Server job... but could be wrong!

_________________
-craig

Watch out where the huskies go and don't you eat that yellow snow
Rate this response:  
Not yet rated
UCDI



Group memberships:
Premium Members

Joined: 21 Mar 2016
Posts: 279

Points: 2784

Post Posted: Thu Sep 15, 2016 8:02 pm Reply with quote    Back to top    

No, and I don't think the old xml stages will work in server job either. Sigh.. maybe brute force is the only answer 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: 42320
Location: Denver, CO
Points: 217325

Post Posted: Fri Sep 16, 2016 6:24 am Reply with quote    Back to top    

The 'old' ones work just fine. I've used them to generate crap tons of XML for Google and Yahoo in the past. Cool

_________________
-craig

Watch out where the huskies go and don't you eat that yellow snow
Rate this response:  
Not yet rated
eostic

Premium Poster



Group memberships:
Premium Members

Joined: 17 Oct 2005
Posts: 3726

Points: 29791

Post Posted: Fri Sep 16, 2016 1:42 pm Reply with quote    Back to top    

The "old" ones work great in all kinds of Jobs and are very important, as there remain some very key things that they can do that the Hierarchical Stage cannot. ...and the Hierarchical Stage does wo ...

_________________
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