5 Replies Latest reply: May 15, 2014 9:52 AM by Grant Perkins RSS

    hierarchical export

    ThomD _

      I need to export my data into a fixed width text file, with the added twist that I need to create header and detail records.

       

      The header line would contain fields that come from the input file header template and the detail lines would contain fields from the input file detail and append templates.

       

      Any ideas on how to do this?

       

      -thanks

       

      Thom

        • hierarchical export
          Grant Perkins

          This may sound like a stupid question but what format is your input file at the moment? You are talking detial and append templates so I assume it is currently some sort of text file.

           

          So is your objective to produce a modified version of the text file?

           

          If so, what aspects of the original do you wish to modify?

           

           

          Grant

           

            Originally posted by ThomD:

          I need to export my data into a fixed width text file, with the added twist that I need to create header and detail records.

           

          The header line would contain fields that come from the input file header template and the detail lines would contain fields from the input file detail and append templates.

           

          Any ideas on how to do this?

           

          -thanks

           

          Thom /b[/quote]

           

          [size="1"][ October 22, 2004, 04:32 PM: Message edited by: Grant Perkins ][/size]

          • hierarchical export
            ThomD _

            The original data is a print-to-file of a purchase order.  You know, all the junk that would be on the paper if we wanted paper.

             

            I've built a model to extract that data, but now I need to create a file that my existing database import system understands.

             

            What I'm doing is converting these text files of POs into a format that our normal EDI system would understand.  If it were all EDI, after an EDI 850 is processed, I would end up with a text file with just a little heirarchy.  I'm essentially using Monarch to do what our EDI software would do if I had an 850 to work with.

             

            I can't send data directly to the database.  It will only take this text file format.

             

            -thanks

             

            thom

            • hierarchical export
              Grant Perkins

              Hi Thom,

               

              OK, I understand the basis of the problem. That said I am not an EDI expert with loads of experience to draw on. There are a few who visit the forum I think and they may offer better advice based on experience.

               

              Two ideas come to mind but they may both be unsuitable for you.

               

              The first is to treat each part of the output as a separate file and then concatenate the results into a single input file. (All by running a single script.)

               

              If you have V7 Pro it may be possible to derive this from a single Project Export process and open the file with the first pass of the process (the header information) and then append to that with the subsequent stages.

               

              Alternatively you might consider producing a summary where the duplication of the header information is suppressed (Suppress duplicates in the relevant columns) and the result is exported to a file. It may then be possible to manipulate that file.

               

              However I think the multi-stage approach is more flexible for your purpose at this point. (Subject to the ideas the experts have!)

               

               

              Grant

               

               

              Originally posted by ThomD:

              The original data is a print-to-file of a purchase order.  You know, all the junk that would be on the paper if we wanted paper.

               

              I've built a model to extract that data, but now I need to create a file that my existing database import system understands.

               

              What I'm doing is converting these text files of POs into a format that our normal EDI system would understand.  If it were all EDI, after an EDI 850 is processed, I would end up with a text file with just a little heirarchy.  I'm essentially using Monarch to do what our EDI software would do if I had an 850 to work with.

               

              I can't send data directly to the database.  It will only take this text file format.

               

              -thanks

               

              thom /b[/quote]

              • hierarchical export
                ThomD _

                Thanks Grant.  First, I'm glad I wasn't missing anything obvious.  Today was the first time I've used Monarch in years, so it would not surprise me if I had missed some new feature.

                 

                I'm not sure how "If you have V7 Pro it may be possible to derive this from a single Project Export process and open the file with the first pass of the process (the header information) and then append to that with the subsequent stages" would work. I do have v7 Pro, so I'll give it a poke on Monday

                 

                 

                -thom

                • hierarchical export
                  Grant Perkins

                  Thom, if you are missing anything obvious then we both are!

                   

                  The reference

                   

                  "... from a single Project Export process and open the file with the first pass of the process ..." is of course referring to opening the export file and then appending rather than the input file.

                   

                  At the back of my mind is a memory that says there is a logical restriction in that for some file types but I cannot remember what at the moment.

                   

                  I will add it in if I remember.

                   

                  Grant

                   

                  Originally posted by ThomD:

                  Thanks Grant.  First, I'm glad I wasn't missing anything obvious.  Today was the first time I've used Monarch in years, so it would not surprise me if I had missed some new feature.

                   

                  I'm not sure how "If you have V7 Pro it may be possible to derive this from a single Project Export process and open the file with the first pass of the process (the header information) and then append to that with the subsequent stages" would work. I do have v7 Pro, so I'll give it a poke on Monday

                   

                   

                  -thom /b[/quote]