How can I use xQuery on AS400 non web Application?

All, I have a XML document on AS400 and try to parse that document on AS400 using xQuery  and send the data to the Physical file How can I do that and this is non a Web application.

My Basic Questions is how can I use xQuery on AS400  non web Application?


Thankyou
Orm
OramcleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gary PattersonVP Technology / Senior Consultant Commented:
Never used xQuery on AS/400 / iSeries, / IBM i, but here's what I found with a quick search:

Here are some brief instructions for installing the datadirect xQuery.  That may give you an idea of how to go about installing your distribution of choice:  

http://forums.datadirect.com/ddforums/thread.jspa?threadID=2581

And here is a general "getting started" tutorial for using xQuery from Java:

http://www.ibm.com/developerworks/library/x-xjavaxquery/

Assuming you plan to code in Java, you'd just use JDBC to write the parsed output to a physical file (table).

If you are an RPG programmer, there is an easier way.  ILE RPG V5R4 and later has native opcodes for parsing XML.  Check out how easy it is to parse XML using the XML-INTO opcode:

http://publib.boulder.ibm.com/infocenter/iadthelp/v7r0/index.jsp?topic=/com.ibm.etools.iseries.langref.doc/c0925086817.htm

http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.iseries.langref.doc/c0925086821.htm

http://iprodeveloper.com/rpg-programming/real-world-example-xml

When asking a quesiton line this, it is very helpful if you can provide some basic onformation, liek what programming language(s) you plan to use, or are able to use, what OS version you are running, and what xQuery distro you plan to use.

- Gary Patterson
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Shalom CarmelCTOCommented:
Hey,  
I forgot about this article :)

Datadirect is a commercial product that needs a commercial license.
An alternative is Saxon, a pure Java XML processor, that can be used standalone or integrated into your application. I also made Saxon work on IBM i, so it is a viable solution.
http://saxon.sourceforge.net/

Xquery is executed in Saxon like this
java -cp saxon9.jar net.sf.saxon.Query -q:<xquery-file> -s:<xml-input-file>
0
OramcleAuthor Commented:
Thank you All.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.