Topic
10 replies Latest Post - ‏2012-12-12T16:58:46Z by SystemAdmin
SystemAdmin
SystemAdmin
6184 Posts
ACCEPTED ANSWER

Pinned topic Error: does not match TERMINATOR '<LF><CR>'

‏2012-12-10T22:11:17Z |
Hello Everyone;

I'm building a project in WTX but i got the "does not match TERMINATOR '<LF><CR>" in my trace, i don't know the origin of this issue and i don'n understand why i see this error if my text is ok. Somebody can help me?

Attaching my ProjectInterchange and the Trace File.

Regards from Colombia.
Cristian.

Attachments

Updated on 2012-12-12T16:58:46Z at 2012-12-12T16:58:46Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6184 Posts
    ACCEPTED ANSWER

    Re: Error: does not match TERMINATOR '&lt;LF&gt;&lt;CR&gt;'

    ‏2012-12-10T23:47:23Z  in response to SystemAdmin
    Hi

    I've attached modified code, it may be helpful to you i think.
    • SystemAdmin
      SystemAdmin
      6184 Posts
      ACCEPTED ANSWER

      Re: Error: does not match TERMINATOR '&lt;LF&gt;&lt;CR&gt;'

      ‏2012-12-11T14:05:17Z  in response to SystemAdmin
      Hello!

      Thanks for your answer, i upload the ProjectInterchange but it shows the same result. :(

      can you explain me about this error? i don´t fuly understand this.

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

    Re: Error: does not match TERMINATOR '&lt;LF&gt;&lt;CR&gt;'

    ‏2012-12-11T14:54:29Z  in response to SystemAdmin
    Your input file, TramaTerritorios.txt, appears to be missing a carriage return/linefeed (CR/LF) at the end of the file. Is this what you expected? That is not the common case.

    (Level 1: Offset 75086, len 0, comp 1 of 1, #1444, DI 000000030449:)
    Data at offset 75086 ('(end of data)...') does not match TERMINATOR '<CR><LF>'
    of TYPE X'0005' (GRUPO2 Group CopyBook).

    This means the end of file was reached but the type tree is defined to expect a <CR><LF> probably because each record has a <CR><LF> terminator.

    BTW, it may be a good idea to define record terminators as <NL> as WTX will interpret this to be the appropriate line terminator for the platform in use, e.g., UNIX=<LF>, Windows=<CR><LF>, IBM Mainframe=h0D. I don't recall how these show up in the trace file though.
    • SystemAdmin
      SystemAdmin
      6184 Posts
      ACCEPTED ANSWER

      Re: Error: does not match TERMINATOR '&lt;LF&gt;&lt;CR&gt;'

      ‏2012-12-11T19:32:02Z  in response to SystemAdmin
      Hello :)

      Thanks for your answer, ok, i got to real all the sentences in my input file but in the output only read the first sentence but it don't show any errors.

      Can you help me in this?
      Cristian
      • SystemAdmin
        SystemAdmin
        6184 Posts
        ACCEPTED ANSWER

        Re: Error: does not match TERMINATOR '&lt;LF&gt;&lt;CR&gt;'

        ‏2012-12-11T20:45:11Z  in response to SystemAdmin
        You have to use a map rule containing a functional map in a target object that occurs multiple times. For example:

        Output Card:
        OutputRecord(s)=FMap(InputRecord)
        • SystemAdmin
          SystemAdmin
          6184 Posts
          ACCEPTED ANSWER

          Re: Error: does not match TERMINATOR '&lt;LF&gt;&lt;CR&gt;'

          ‏2012-12-12T14:39:41Z  in response to SystemAdmin
          Hello!

          Thanks for your answer, i put the FMap (Funcional Map) in my project but i got the same results, can you explain me about the functional maps and the "Set Range" option? the range determines how much data can pass through to the final XML right?

          Thanks for your help and regards from Colombia;
          Cristian.
          • SystemAdmin
            SystemAdmin
            6184 Posts
            ACCEPTED ANSWER

            Re: Error: does not match TERMINATOR '&lt;LF&gt;&lt;CR&gt;'

            ‏2012-12-12T15:13:58Z  in response to SystemAdmin
            Check the Map Designer documentation for a discussion of functional maps.

            Yes, the range determines how many of a specific object can occur in the XML output.

            The Set Range in the Type Designer may be defined as follows:
            Min:Max
            0:1 Optional, may occur once
            1:1 Mandatory, occurs once (This is the default.)
            0:s Optional, may occur more than once
            1:s Mandatory, may occur more than once
            0:n Optional, may occur up to n times (Replace "n" with an integer.)
            1:n Mandatory, may occur up to n times (Replace "n" with an integer.)

            "s" indicates an indeterminate number of occurrences. Unless you have defined your target record as having a "Max" range greater than 1, you will never see more than one output record.

            Note that whether an item or group is mandatory is only enforced during validation which occurs during input, not output. That is, you don't have to populate a mandatory object in your output.

            I suggest you set your Window>Preference:Transformation Extender:Type Tree:Group to specify Show range and Show component number if you haven't already.
            • SystemAdmin
              SystemAdmin
              6184 Posts
              ACCEPTED ANSWER

              Re: Error: does not match TERMINATOR '&lt;LF&gt;&lt;CR&gt;'

              ‏2012-12-12T16:10:05Z  in response to SystemAdmin
              Hello;

              I can't explain my trouble textually (mny level in english is not enough, sorry for that...) but i can upload my project and one screenshot with the evidence of the trouble, the screenshot shows the number of data obtained in this input, (7200 aprox.) and the output (only 6) the output should be the 7200 aprox.

              I hope that the files and this explain text help to solve this incident.

              Regards from Colombia.
              Cristian.

              Attachments

              • SystemAdmin
                SystemAdmin
                6184 Posts
                ACCEPTED ANSWER

                Re: Error: does not match TERMINATOR '&lt;LF&gt;&lt;CR&gt;'

                ‏2012-12-12T16:40:10Z  in response to SystemAdmin
                1. Delete your functional map.
                2. Change your map rule to "=FUNCIONAL_MAP(GRUPO2 Group:entrada)"
                3. Re-create the functional map using the Functional Map Wizard.
                4. Map the four fields in GRUP02 to the output fields in the functional map
                5. Build and execute the map, HOST_TO_XML

                By choosing your entire input file as the object to pass in your functional map, you told the FMap to only run once. By passing each record as indicated above, the FMap will run once for each input record.
                • SystemAdmin
                  SystemAdmin
                  6184 Posts
                  ACCEPTED ANSWER

                  Re: Error: does not match TERMINATOR '&lt;LF&gt;&lt;CR&gt;'

                  ‏2012-12-12T16:58:46Z  in response to SystemAdmin
                  Hello!

                  Thanks for your help and your patience; Now my project shows the correct results.

                  Regards from Colombia
                  Cristian.