Create XML file from AS/400

5 pts.
Tags:
AS/400 FTP
XML
How I do? How I send via ftp?

Software/Hardware used:
AS 400 Iseries machine

Answer Wiki

Thanks. We'll let you know when a new response is added.

Try these:

http://www.rpg-xml.com/freedownload.aspx

http://www.scottklement.com/expat/

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TomLiotta
    What OS version/release? What languages are you willing to use? What DB2 options do you have installed? Answers to your question can be very different for different ways you might answers those questions. You need to give us something to work with; otherwise a correct answer can be "Start writing code to emit XML files. You can do it just like you would write any streamfile if that's how you choose to do it." Tom
    125,585 pointsBadges:
    report
  • Sloopy
    I have example code to show how to create XML stream files from DB/400 files. The output is placed into a folder in your AS/400's IFS, from where you can ftp it to its destination. I'm not best placed to advise you on the ftp side! But if you would like the sample code to create the XML, write to me at john.blenkinsop@ne.nykline.com Sloopy
    2,195 pointsBadges:
    report
  • bernard85
    you'll find here a way to generate a XML on IFS.
    data are stored in a tree when the function xml_tree2xml is called a dedicated procedure is sent also to build the nodes on the xml file

         //‚--------------------------------------------------------------------
          //‚Save tree as XML
          //‚--------------------------------------------------------------------
         pxml_tree2XML     b                   export
         d xml_tree2XML    pi
         d  xmlpath                     128a   const varying
         d  lRoot                          *   const
         d  pXX_XMLoutput                  *   const procptr
          *
         d  hXML           s             10i 0
          /free
            hXML=ifs_openforWrite(XMLpath);
            ifs_println(hXML:'<?xml version="1.0" encoding="ISO-8859-1" ?>');
            xml_tree2XML2(hXML:lRoot:pXX_XMLoutput);
            ifs_close(hXML);
          /end-free
         p                 e
          //‚--------------------------------------------------------------------
          //‚Save tree as XML part2
          //‚--------------------------------------------------------------------
         pxml_tree2XML2    b
         d xml_tree2XML2   pi
         d  hXml                         10i 0
         d  lNode                          *   const
         d  pXX_XMLoutput                  *   const procptr
          *
         d xml_Node        ds                  likeDs(xml_NodeDefine)
         d lNode2          s               *
          *
         d xxx_XMLoutPut   pr                  extProc(pXX_XMLoutput)
         d                                     likeDs(xml_nodeDefine)
         d   lNode                         *   const
          /free
           xml_node=xxx_XMLoutput(lNode);
           xml_Node.isOpen=*on;
           xml_Node.isClose=tree_getFirst(lNode)=*null;
           xml_node.level=tree_getLevel(lNode);
           xml_writeNode(hXml:xml_node);
           //
           if not xml_Node.isClose;
             //‚Process childs                                                     -
             lNode2=tree_getFirst(lNode);
             dow lNode2<>*null;
               xml_tree2XML2(hXML:lNode2:pXX_XMLoutput);
               lNode2=tree_getNext(lNode2);
             endDo;
             xml_Node.isOpen=*off;
             xml_Node.isClose=*on;
             xml_writeNode(hXml:xml_node);
           endIf;
          /end-free
         p                 e
    380 pointsBadges:
    report
  • azohawk
    Craig Rutledge <www.jcrcmds.com> has some utilities also. I have not used these specific utilities, so I can't vouch for them.
    2,915 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: