IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 7 replies
  • Latest Post - ‏2013-01-16T21:45:45Z by SystemAdmin
Developer11
Developer11
3 Posts

Pinned topic xml to cobol mapping - Please help

‏2013-01-08T07:27:22Z |
Hi Team,

I am trying to create map file using WTX for transforming the xml message to cobol.
But the transformation is not working as expected.

Here is the transformed message (it's also there in the attached zip file).

<?xml version="1.0"?>
<purcha derDate="1999-01-21" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="po_2.xsd">

Reason why there are spaces after "purcha" is because the second element in the cobol layout is not mapped.

I am attaching the zip file which contains the project files like (the schema used, the copybook, type trees and the map files).

The version that I am working on is 8.2.0.5.

Please advise.

Thanks
Updated on 2013-01-16T21:45:45Z at 2013-01-16T21:45:45Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: xml to cobol mapping - Please help

    ‏2013-01-08T16:17:32Z  
    You didn't include the input file, po_xml_data.xml.
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: xml to cobol mapping - Please help

    ‏2013-01-08T16:22:56Z  
    You didn't include the input file, po_xml_data.xml.
    Nevermind. Yes, you did. It was just that you didn't edit your input card to point to it.
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: xml to cobol mapping - Please help

    ‏2013-01-08T16:27:05Z  
    What do you expect it to do? It works fine. Here is the output:
    "Widget John Doe 123 North St Miami FL "
  • Developer11
    Developer11
    3 Posts

    Re: xml to cobol mapping - Please help

    ‏2013-01-10T07:17:34Z  
    What do you expect it to do? It works fine. Here is the output:
    "Widget John Doe 123 North St Miami FL "
    Thanks for the response Jim

    The output that you mentioned there is what I am expecting. But as mentioned in my post earlier, the output that I get is not in Cobol.

    The Output that I see in the text file is

    <?xml version="1.0"?>
    <purcha derDate="1999-01-21" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="po_2.xsd">

    Which is part of the input xml message that I submitted.

    Please advise.
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: xml to cobol mapping - Please help

    ‏2013-01-10T15:54:10Z  
    Thanks for the response Jim

    The output that you mentioned there is what I am expecting. But as mentioned in my post earlier, the output that I get is not in Cobol.

    The Output that I see in the text file is

    <?xml version="1.0"?>
    <purcha derDate="1999-01-21" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="po_2.xsd">

    Which is part of the input xml message that I submitted.

    Please advise.
    When I open the result file, po_copybookdata.txt, I see:
    
    Widget                                  John Doe                      123 North St                  Miami                         FL
    

    I'm running on WTX 8.4.0.3. That's all I know.
  • Developer11
    Developer11
    3 Posts

    Re: xml to cobol mapping - Please help

    ‏2013-01-14T02:06:44Z  
    When I open the result file, po_copybookdata.txt, I see:
    <pre class="jive-pre"> Widget John Doe 123 North St Miami FL </pre>
    I'm running on WTX 8.4.0.3. That's all I know.
    Hi Jim,

    Have you used the "type trees" and the "map file" that I sent in the zip file?
    Please confirm

    Thanks
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: xml to cobol mapping - Please help

    ‏2013-01-16T21:45:45Z  
    Hi Jim,

    Have you used the "type trees" and the "map file" that I sent in the zip file?
    Please confirm

    Thanks
    Yes, I just ran your map.