Topic
6 replies Latest Post - ‏2012-12-14T15:45:45Z by SystemAdmin
SystemAdmin
SystemAdmin
6184 Posts
ACCEPTED ANSWER

Pinned topic Error: Failed Item Presentation and Invalid Data for Type

‏2012-12-13T16:41:31Z |
Hello Everyone;

I'm building a new map, with some data from my input data, the problem is what is one field is "xsd:decimal" and WTX classifies it in Decimal Type, but i can't get sucess in build this map, in the trace record appear the "Failed item presentation" and "Invalid data for TYPE" but the input data is OK.

Where i can find the problem? it's some type of data validation in my Input MTT? I attach the ZIP with the ProjectInterchange and the trace results of the project.

Thanks and regards from Colombia
Cristian.
Updated on 2012-12-14T15:45:45Z at 2012-12-14T15:45:45Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6184 Posts
    ACCEPTED ANSWER

    Re: Error: Failed Item Presentation and Invalid Data for Type

    ‏2012-12-13T21:20:14Z  in response to SystemAdmin
    (Level 1: Offset 26, len 13, comp 4 of 5, #1, DI 000000000004:)
    Data at offset 26 (' 383.7064628') failed item presentation test for TYPE
    X'0008' (DIVISA_TASA Field CopyBook).

    This is an input trace. It has nothing to do with XML output. DIVISA_TASA is defined in MTT_DivisasV2.mtt as a zero-filled integer but your data is a space-filled decimal number. Correct the properties in your type tree.
    • SystemAdmin
      SystemAdmin
      6184 Posts
      ACCEPTED ANSWER

      Re: Error: Failed Item Presentation and Invalid Data for Type

      ‏2012-12-13T21:45:59Z  in response to SystemAdmin
      Hello and thanks for your answer.

      Ok, where i can see the "space-filled" property in my type tree? In the pad option or in the size property? I`m a newbie with WTX and i cannot find this.

      Thanks again.
      Regards from Colombia.
      Cristian.
      • SystemAdmin
        SystemAdmin
        6184 Posts
        ACCEPTED ANSWER

        Re: Error: Failed Item Presentation and Invalid Data for Type

        ‏2012-12-13T21:59:19Z  in response to SystemAdmin
        "space-filled" means "padded with spaces". You need to change Item Subclass:Presentation to Decimal and the Item Subclass:Pad:Value to "SP".
        • SystemAdmin
          SystemAdmin
          6184 Posts
          ACCEPTED ANSWER

          Re: Error: Failed Item Presentation and Invalid Data for Type

          ‏2012-12-13T22:14:47Z  in response to SystemAdmin
          Hello

          Thanks for your answer, i realize the changes you suggest but i obtain the same result.

          Why i obtain this problem? It's some config in the MMT? I'm getting lost with this.

          Regards.
          Cristian.
        • SystemAdmin
          SystemAdmin
          6184 Posts
          ACCEPTED ANSWER

          Re: Error: Failed Item Presentation and Invalid Data for Type

          ‏2012-12-13T22:15:14Z  in response to SystemAdmin
          Hello

          Thanks for your answer, i realize the changes you suggest but i obtain the same result.

          Why i obtain this problem? It's some config in the MMT? I'm getting lost with this.

          Regards.
          Cristian.
          • SystemAdmin
            SystemAdmin
            6184 Posts
            ACCEPTED ANSWER

            Re: Error: Failed Item Presentation and Invalid Data for Type

            ‏2012-12-14T15:45:45Z  in response to SystemAdmin
            See http://www.ibm.com/developerworks/downloads/soasandbox/transform.html

            Exercise: Transform a text document into XML using WebSphere Transformation Extender
            In this exercise, you will use the COBOL copybook importer to automatically create a WebSphere Transformation Extender type tree, which you will customize using the type designer. Then you will create a map that transforms into an XML document the simple text document you imported into your type tree.

            I suggest you go through the tutorial referenced above. It steps through exactly what you are trying to do.

            Your input type tree only describes a single record. It needs to describe a file containing many records. Otherwise, you will only get a single record output.