3 Replies Latest reply: May 15, 2014 9:57 AM by Shreve _ RSS

    Not sure how to trap this efficiently

    Shreve _

      I'm trying to grab data from this Point of Sale report.

       

      Unfortuntately, this particular property does not number their Sales each hour with the same number of digits.  As show below.  This makes my column width traps not work property.

       

      Any suggestions

       

       

      1 12 - 01 pm

      2 01 - 02 pm

      100 02 - 03 pm

      200 03 - 04 pm

      1000 04 - 05 pm

      2000 05 - 06 pm

        • Not sure how to trap this efficiently
          Grant Perkins

          Originally posted by Shreve:

          I'm trying to grab data from this Point of Sale report.

           

          Unfortuntately, this particular property does not number their Sales each hour with the same number of digits.  As show below.  This makes my column width traps not work property.

           

          Any suggestions

           

          [font="courier"]1 12 - 01 pm

          2 01 - 02 pm

          100 02 - 03 pm

          200 03 - 04 pm

          1000 04 - 05 pm

          2000 05 - 06 pm /font[/quote][/b][/quote]For trap purposes, if you have a Monarch version with floating trap capability you could use that, working with the widest line of data you can find OR, more specifically, setting the trap characters to work with the maximum fields sizes between them. (Where multiple trap characters are required.

           

          Alternatively if you have at least some way to make each line unique for trapping, take the entire line (if necessary) and then slice and dice it using something like the LSPLIT and  RSPLIT functions.

           

          I can expand on either of these ideas if you don't know how to progress with them. (assuming that there are no further complication introduced by this awkward input!)

          • Not sure how to trap this efficiently
            Shreve _

            Good advice.  I've never used either of these options before.

             

            I'll attempt to figure them out and let you know if they worked

             

            Thx for the suggestions

            • Not sure how to trap this efficiently
              Shreve _

              Lsplit worked perfectly

               

              Thanks so much