3 Replies Latest reply: May 15, 2014 10:05 AM by ruby _ RSS

    ....More help needed.

    ruby _

      If I have a report that I am pulling data from that also includes "Errors" in which I would not want to pull that data.  The Error Section data has the same format as the other data so when I have a template set up to pull the normal data it is also pulling the "Error" data.  So it looks something like this ....

       

      Data

      Data

      .

      .

      .

      ERROR SECTION (this is actually on the line so it is a unique line)

      .

      .

      .

      Data

      Data

       

      I want to tell Monarch not to pull any data under the ERROR SECTION line (if it is on the report bc it is not always present - only when there are errors)

       

      Any suggestions??

       

      Thanks.

        • ....More help needed.
          Grant Perkins

          Hi Ruby,

           

          Two first response thoughts.

           

          Is there any difference at all in the DETAIL template trap possibilities that would allow you to identify the records you want but skip the Error records? Could you add to the trap or maybe even take something away?

           

          If not possible at that point the next idea is to trap as you have at the detail level but add an append template (if you don't already have one) that captures the ERROR header. Is there a comparable header, even an empty one, that could be trapped for the non-error records?

           

          If you can include a field that identifies which section the records come from you can apply a filter that, for display/output,  retains only the record section(s) you want to keep.

           

          If those ideas don't work out for you we can dig a little deeper ...

           

          HTH.

           

          Grant

            • ....More help needed.
              Olly Bond

              Hello Ruby, hello Grant,

               

              One of the most horrible spool files I ever saw came from a mainframe with multiple reports all just poured into one file, sometimes overlapping or intermingled with each other. Even before Monarch v10 and the "turn off append", it was possible to fix it.

               

              On option you could explore is Page Header - but you need your data to behave nicely in chunks of less than 256 lines. You can sometimes get some structure into your data by trapping what look like headers as detail in one model, and tying them back to the corresponding detail records via an external lookup with Page() as the join key.

               

              Otherwise Grant's Append suggestion is more flexible. Does your data start with "good" records, then have some "bad" ones, then go back again to having "good" ones? Are there duplicates? Would it be easier if the whole file was turned upside down (easy to fix in a script)? How automated do you need the solution to be?

               

              Best wishes,

               

              Olly

                • ....More help needed.
                  ruby _

                  I have found a difference in the DETAIL template trap to use between the "normal" data and the "error" data.  I do not know why I didn't notice it in the first place.  If I find a situation in which this does not work, I may be replying back AGAIN.  Thanks for your suggestions.

                   

                  Have a good day -