3 Replies Latest reply: May 15, 2014 9:55 AM by Grant Perkins RSS

    Trapping Multiple Lines for Detail

    gpotenza _

      Please understand I am VERY new to Monarch...

       

      I have a report with blocks of detail that need to be trapped.  For example I would only need to trap the lines that begin with "#/S".  This was easy, only each block has different field names.  See Sample Below:

      ........AM.....AMC.....GAZ

      #/S.....10.....10.....0

      $/P......0.....15.....20

       

      ........NAL.....NN.....NORF

      #/S......7.....15......10

      $/P.....10.....10.......0

       

      Not only do I need the detail line but I need to Match the correct field names to each block of detail.  I hope this explanation makes sense.

       

      [size="1"][ June 01, 2004, 03:23 PM: Message edited by: gpotenza ][/size]

        • Trapping Multiple Lines for Detail
          Grant Perkins

          Hi,

           

          Just to clarify ...

           

          Are the field names the column headings from the line above the detail line?

           

          So you need to get to something like

           

          AM 10, AMC 10, GAZ 0

          NAL 7, NN 15, NORF 10

           

          How good is the alignment on the columns for the headings and the data fields?

           

           

          Grant

           

           

          Originally posted by gpotenza:

          Please understand I am VERY new to Monarch...

           

          I have a report with blocks of detail that need to be trapped.  For example I would only need to trap the lines that begin with "#/S".  This was easy, only each block has different field names.  See Sample Below:

          ........AM.....AMC.....GAZ

          #/S.....10.....10.....0

          $/P......0.....15.....20

           

          ........NAL.....NN.....NORF

          #/S......7.....15......10

          $/P.....10.....10.......0

           

          Not only do I need the detail line but I need to Match the correct field names to each block of detail.  I hope this explanation makes sense. /b[/quote]

          • Trapping Multiple Lines for Detail
            gpotenza _

            Yes, the field names are the column headings. 

             

            Also, the alignment is to the right for each column.  All right-most characters align (for both the column headers and detail)

             

            The sample I supplied in this post is only a sample.  Just so you know, there is an additional detail line after the header that I do not need as detail.  Basically I have 4 rows per group:

             

            1. Field Names

            2. a detail line with a number and organism name that needs to be used to group data

            3. #/S (this is the detail line)

            4. #/P (data I do not need)

             

            I've redone my sample:  see below:

             

            ...............AM..........AMC..........GAZ

            BAUMAN ORG......3............3............3

            #/S............10...........15...........10

            #/P............20...........10............5

             

            ..............NAL...........NN.........NORF

            #/S............15...........15...........10

            #/P............25...........10............5

             

             

            ...............AM..........AMC..........GAZ

            XYLOSOXI ORG....5............5............5

            #/S............12...........15...........10

            #/P............22...........14............5

             

            ..............NAL...........NN.........NORF

            #/S............15...........17...........10

            #/P............25...........13............5

             

             

            I could email you a sample of the data if you like.

            • Trapping Multiple Lines for Detail
              Grant Perkins

              I think the email would be a good idea! That extra line in the first group of each record probably blows away my simplest solution.     

               

              I'll send you a Private Message with an email address.

               

               

              Grant

               

              Originally posted by gpotenza:

              Yes, the field names are the column headings. 

               

              Also, the alignment is to the right for each column.  All right-most characters align (for both the column headers and detail)

               

              The sample I supplied in this post is only a sample.  Just so you know, there is an additional detail line after the header that I do not need as detail.  Basically I have 4 rows per group:

               

              1. Field Names

              2. a detail line with a number and organism name that needs to be used to group data

              3. #/S (this is the detail line)

              4. #/P (data I do not need)

               

              I've redone my sample:  see below:

               

              ...............AM..........AMC..........GAZ

              BAUMAN ORG......3............3............3

              #/S............10...........15...........10

              #/P............20...........10............5

               

              ..............NAL...........NN.........NORF

              #/S............15...........15...........10

              #/P............25...........10............5

               

               

              ...............AM..........AMC..........GAZ

              XYLOSOXI ORG....5............5............5

              #/S............12...........15...........10

              #/P............22...........14............5

               

              ..............NAL...........NN.........NORF

              #/S............15...........17...........10

              #/P............25...........13............5

               

               

              I could email you a sample of the data if you like. /b[/quote]