Prcessing XML files

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Das
Participant
Posts: 87
Joined: Tue Oct 24, 2006 9:58 pm
Location: india

Prcessing XML files

Post by Das »

Hi
I am very new to " XML stages " in data stage.I have a requirement to convert an XML data file to a text file .i have to create the job in server and parrelel jobs

In server job:I have done the design as follows

folder stage----->XML input-------->Flatfile

But while running it is giving an error that Derivations are missing in XML input..Plaese Help

How i can impliment the same in PX

Thanks in advance..
vinbhate
Participant
Posts: 36
Joined: Tue Jul 17, 2007 12:51 am
Location: India-Mumbai

Post by vinbhate »

Hi
please check the output tab in XML input stage..there metadata of file is missing with grammer .Incase any more help need just let me know
Regards and Thanks,
Vinita Bhate
Das
Participant
Posts: 87
Joined: Tue Oct 24, 2006 9:58 pm
Location: india

Post by Das »

vinbhate wrote:Hi
please check the output tab in XML input stage..there metadata of file is missing with grammer .Incase any more help need just let me know
Thanks..Could you explain the things in detail:How the whole process
My EMP.XML file will look like as follows.


<EMP>
<EMPNO>23</EMPNO>
<NAME>ABC</NAME>
<DEPTNO>123</DEPTNO>
</EMP>


I dont have any documents related to the xml stages..
Das
Participant
Posts: 87
Joined: Tue Oct 24, 2006 9:58 pm
Location: india

Post by Das »

vinbhate wrote:Hi
please check the output tab in XML input stage..there metadata of file is missing with grammer .Incase any more help need just let me know
Thanks..Could you explain the things in detail:How the whole process
My EMP.XML file will look like as follows.


<EMP>
<EMPNO>23</EMPNO>
<NAME>ABC</NAME>
<DEPTNO>123</DEPTNO>
</EMP>


I dont have any documents related to the xml stages..
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you have the XML stages then you have the documents.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Exactly. Look for the 'XML PACK' pdf documentation in your Docs directory. Also go to Kim Duke's website and download the XML Best Practices document that is in his Tips section.

Sounds like what you are missing are the XPath Expressions that drive the XML parsing. Read the docs.
-craig

"You can never have too many knives" -- Logan Nine Fingers
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Craig is right. To install the samples and look at their details helps very well to understand the way XML and DataStage work.
Wolfgang Hürter
Amsterdam
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

The XML stages are fairly well documented, and the Best Practices is a DO NOT MISS document.

In addition, many of us also frequent the IBM DeveloperWorks site....I recently put an entry there that also might help you...check out the XBRL thread at http://www.ibm.com/developerworks/forum ... orumID=825

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Das
Participant
Posts: 87
Joined: Tue Oct 24, 2006 9:58 pm
Location: india

Post by Das »

Hi Thanks for your help.I have gone through the link mentioned below and did exatlt wht they mentioned
but still I am facing some more issues realted to xml stages.

Following is my job design ,to convert XML Doc to SEQUNCILAL file,

Folder stage------XML input-----SEQfile stage.

Folder stage properties which i a have set as follows


Folder path name c:\xml\*.xml

and column defenisions as follows

FileName Varchar 255
Record Longvarchar 999999

XML input stage where i have set the properties as below

In out put tab transformation sttings i have enabled " repetation Required " and also loaded the name space declaration

Then i tried to run the job it is giving the following error

waring:unable to open the folder c:\xml_data\*.xml
fatel xml_input_1:/new_xml_job.folder.DSLiknk3.DSD.UVOpen Unable to open the folder c:\xml_data\*.xml.l

Please help me out
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ok, it can't find your files because you've entered the values wrong. The Folder pathname should just be "C:\xml" and then your Wildcard pattern should be "*.xml".

Give that a shot.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Das
Participant
Posts: 87
Joined: Tue Oct 24, 2006 9:58 pm
Location: india

Post by Das »

chulett wrote:Ok, it can't find your files because you've entered the values wrong. The Folder pathname should just be "C:\xml" and then your Wildcard pattern should be "*.xml".

Give that a shot. ...
Thanks.I didnt get your comment exatly.

Actually all my XML files are keeping at the loction C:\xml_data\

So that i given C:\xml_data\*.xml [Folder path ]\[wild card to fetch the xml file]Any thing wrong with this path.Please help me out.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You said both paths, I picked one.

Stage / Properties / Folder pathname: C:\xml_data

Outputs / Properties / Wildcard: *.xml
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply