Flatfile disassembler

Home Page Forums BizTalk 2004 – BizTalk 2010 Flatfile disassembler

Viewing 3 reply threads
  • Author
    Posts
    • #12009

      Hello.
      I find your video on FlatFileDiss informative. Please forgive the extremely novice attitude you will hear from me. I need to parse out a multi-level flat file into separate xml documents. In your example you have a header for the batch job, and separate documents that you return as output if I understood it correctly. How would I handle the case where there is not really a header in my files. Here’s a simple representation of the FF’s I deal with. 3 envelopes below, all identical for simplicity.

      ENV|abc|123
      HDR|def|456|!@#
      LIN||xyz|098|nop
      ENV|abc|123
      HDR|def|456|!@#
      LIN||xyz|098|nop
      ENV|abc|123
      HDR|def|456|!@#
      LIN||xyz|098|nop

      how would you suggest I set up my document and header schemas?

      thanks in advance

    • #12010

      This is what I’ve managed to do:

      I created one single schema that has an Envelope Node \”ENVs,\” and then have a Child Record under it that is the ENV structure itself. I leave the max and min occurences to the default (1), as my understanding is it will create a separate instance/xml file for each ENV.

      I use ffdasm at the command prompt and get separate XML files. When I deploy my solution and run it, it fails. The stream errors in the middle of one of the children on the last line of the n-th ENV.

      ex:

      LIN|xyz|0*98|nop

      * – where the stream stops.

      I found that this is tied to the child delimter of 0x0D 0x0A being at the end of the last line. So I actually took it out (b/c suppressing trailing delimiters didn’t seem to make a difference). I run the orchestration again, and it runs through…BUT, one large XML instead of separate ones. AND, when I run ffdasm at the command prompt, it fails giving me a similar error where the parsing fails in the middle of a field.

      • #12011

        I re-read your response. So you don’t think I should have an \”ENV’s\” node, but rather JUST have the ENV under the schema node, and have the rest of my structure under that?
        [quote:ff47ea7676=\”Stephen W. Thomas\”]Hello.

        I would set this up putting the Envelope into the file. I would create a single schema like this:
        ENV|abc|123
        HDR|def|456|!@#
        LIN||xyz|098|nop

        Then, used the native features of the Flat File Disassembler each message will be broken up and sent to the message box. So, if you message has 5 ENV you will get 5 messages.

        I would not message with a header.

        Do you think this would work for you?[/quote:ff47ea7676]

        • #12012

          [quote:2339a6e8e6=\”Stephen W. Thomas\”]Yes, I do not think you need to use an Envelope in this case.

          I would first break the message up and get it into Xml. If you need to remove the Envelope later on, you can do it inside a map in the Orchestation or Send port.

          Do you think that will work for you?[/quote:2339a6e8e6]

          OK, when I change my schema, the pipeline is still trying to use the message type \”http://blah.blah#ENVs\”, rather than \”http://blah.blah#ENV\” (no s).

          How can I change that? I completely took out that node of the schema.

          • #12013

            [quote:b09a8ae872=\”Stephen W. Thomas\”]Lets see. Try removing the schema from the collection list inside the Flat File Disassembler. Then, re-add it.

            If that doesn’t work. Delete the Flat File Disassembler and add it back into the pipeline. Make sure you are restarting the host as well.

            Let me now how it goes.[/quote:b09a8ae872]
            Hey Stephen,
            Those steps didn’t help, so I just made a backup of my work, and started another project clean (since I obviously wasn’t too far along :P). Works like a charm! Thanks so much for your help, such a simple solution, but then again it was a simple problem.

            Thanks!
            Tom

            • #12014

              Hello.

              I would set this up putting the Envelope into the file. I would create a single schema like this:
              ENV|abc|123
              HDR|def|456|!@#
              LIN||xyz|098|nop

              Then, used the native features of the Flat File Disassembler each message will be broken up and sent to the message box. So, if you message has 5 ENV you will get 5 messages.

              I would not message with a header.

              Do you think this would work for you?

              • #12015

                Yes, I do not think you need to use an Envelope in this case.

                I would first break the message up and get it into Xml. If you need to remove the Envelope later on, you can do it inside a map in the Orchestation or Send port.

                Do you think that will work for you?

                • #12016

                  Lets see. Try removing the schema from the collection list inside the Flat File Disassembler. Then, re-add it.

                  If that doesn’t work. Delete the Flat File Disassembler and add it back into the pipeline. Make sure you are restarting the host as well.

                  Let me now how it goes.

    • #50060
      biztalkgurus

        The Prettiest by Brigit Young — 9781626729230

      • #50061
        biztalkgurus

          Fire Horse : Sharon Siamon : 9781552854570

      Viewing 3 reply threads
      • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.