|
If you want the iSeries to do the work, which is where it should be since it sounds like it is the master database and has more power than a PC, and you have a mechanism to write data output in XML out of the iSeries, why not create a PC application to invoke stored procedure(s) on the iSeries. I've done this from PC Web applications which lets the iSeries DB2 do the SELECT, INSERT, UPDATE or DELETE of the data and then sends the answer set back to the PC. Again, if you can do the conversion you need on the iSeries side, I don't see why stored procedure(s) can't do the work for you. Just a way of thinking that lets the PC do the presentation layer and the iSeries the data base layer. Dave >>> joelcochran@xxxxxxxxx 11/10/2005 09:16:56 >>> Dave, But does it need to be done in RPG? Is there a reason it can't be .NET? The only reason I ask is that you already have the tools in place (except for maybe the driver). There is no built-in mechanism for this on the 400. Also, what will the schema of your XML be? If you want to later import this into a handheld or other .NET program, it will need to be in the MS DataSet XML standard. <WARNING: blatant self-promotion> Does this even need to be a program, or is it simply a task you have to do once in a while? I have a new .NET Ad Hoc SQL tool out that would let you execute your SQL and then save the results as MS DataSet XML (among other things). If your IFS is mapped, you can save it directly to your 400. Check it out at: http://www.ihocquery.com </self-promotion> If you want/need to do it in RPG, here is a sample program on my website that demonstrates writing XML to the IFS: http://www.rpgnext.com/codesamples/BPRSLTXML.RPG It even includes some indenting for readability. It just reads from an array, but you could obviously alter it to read an SQL cursor instead. You should be able to use most of the subprocedures as they are. The key one to change would be "WriteData()". HTH, Joel On 11/10/05, Dave Reiher/prairiefarms <DReiher@xxxxxxxxxxxxxxxx> wrote: > > What I am looking to do is run a SQL statement and spit out some XML to > the IFS, if this is possible and doesn't take a ton of code to accomplish. > > Dave Reiher > System Analyst > Prairie Farms Dairy - Corporate > dreiher@xxxxxxxxxxxxxxxx > > > > Dave Reiher/prairiefarms <DReiher@xxxxxxxxxxxxxxxx> > Sent by: web400-bounces@xxxxxxxxxxxx > 11/10/2005 09:31 AM > Please respond to > Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx> > > > To > web400@xxxxxxxxxxxx > cc > > Subject > [WEB400] XML > > > > > > > I have done much more development in Microsoft's .NET than using RPG. When > > I did .NET development I wrote an application allowing users to seamlessly > > take certain tables with them on their laptops our handhelds in the form > of XML. With .NET it was almost too easy to do this. I basically used a > SQL statement to fill a dataset and the dataset object has a writeXML > function which would spit out the XML for me. Once disconnected the > dataset had a function to read the xml back in. > > Is there anything remotely similar that I could use on the 400?? > > Dave Reiher > System Analyst > Prairie Farms Dairy - Corporate > dreiher@xxxxxxxxxxxxxxxx > -- > This is the Web Enabling the AS400 / iSeries (WEB400) mailing list > To post a message email: WEB400@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/web400 > or email: WEB400-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/web400. > > > -- > This is the Web Enabling the AS400 / iSeries (WEB400) mailing list > To post a message email: WEB400@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/web400 > or email: WEB400-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/web400. > > -- This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.