Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
7 replies Latest Post - ‏2013-01-16T21:45:45Z by SystemAdmin
Developer11
Developer11
3 Posts
ACCEPTED ANSWER

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
    ACCEPTED ANSWER

    Re: xml to cobol mapping - Please help

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

      Re: xml to cobol mapping - Please help

      ‏2013-01-08T16:22:56Z  in response to SystemAdmin
      Nevermind. Yes, you did. It was just that you didn't edit your input card to point to it.
  • SystemAdmin
    SystemAdmin
    6184 Posts
    ACCEPTED ANSWER

    Re: xml to cobol mapping - Please help

    ‏2013-01-08T16:27:05Z  in response to Developer11
    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
      ACCEPTED ANSWER

      Re: xml to cobol mapping - Please help

      ‏2013-01-10T07:17:34Z  in response to SystemAdmin
      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
        ACCEPTED ANSWER

        Re: xml to cobol mapping - Please help

        ‏2013-01-10T15:54:10Z  in response to Developer11
        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
          ACCEPTED ANSWER

          Re: xml to cobol mapping - Please help

          ‏2013-01-14T02:06:44Z  in response to SystemAdmin
          Hi Jim,

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

          Thanks