+1 on using CGIDEV2 - haven't tried XMLi yet - I used the former to do just what you are looking for, Debbie.

For really simple, flat XML - one level deep - you could use a template like this - it will have "tags" for replacing with actual data.

<!-- $XMLHeader$ -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE activity_import_file SYSTEM "activity.dtd">
<!-- $Activity$ -->
<custno><!-- %CustomerNumber% --></custno>
<actvdate><!-- %ActivationDate% --></actvdate>
<actvtime><!-- %ActivationTime% --></actvtime>
<history><![CDATA[<!-- %HistoryEntry% -->]]></history>
<!-- $XMLFooter$ -->

I used a form of XML/HTML comment for the markers, such as <!-- $XMLHeader$ -->, for sections, or <!-- %CustomerNumber% --> for variables.


On 8/11/2014 8:35 AM, Jon Paris wrote:
It depends a lot on the structure of the xml required but ...

You can use a tool like CGIDEV2 see http://www.ibmsystemsmag.com/ibmi/developer/rpg/Using-CGIDEV2-for-Generating-XML/ for examples

You could use the XML capabilities of powerExt core https://code.google.com/p/powerext/

or those of XMLi http://sourceforge.net/projects/xmli/

Depending on your release level there are also built-in capabilities in DB2 but they can be a pain in the ... to configure and use. There are tools in the Rational tool set to simplify the process but they are not included in the base level RDi and are expensive unless you are going to make very extensive use of them.

On 2014-08-11, at 9:10 AM, Debbie Panco <DPanco@xxxxxxxx> wrote:

Hi, I am trying to find a way to convert an AS400 database file to an XML file. I know that this
is not a difficult thing to do. My issue is that I simply lack the knowledge. Is there a simple tool
in Web Sphere Development Studio Client that does this? Or does anyone know of a utility/tool
outside of it that will do the same?

Your assistance would be greatly appreciated.

Debbie Panco
Senior Systems Analyst / Project Leader
United Consumer Financial Services
865 Bassett Road
Westlake, Ohio 44142


CONFIDENTIALITY NOTICE: This message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Jon Paris


This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page