3 Replies Latest reply: May 15, 2014 10:06 AM by jbvinny _ RSS

    Capturing Shifting Data

    jbvinny _

      abcd--efgh-ijkl----mnop

      abcd--efgh-ijkl----mnop

      abcdefgh-ijkl------mnop

      abcd--efgh-ijkl----mnop

       

      Above is an approximate sample of my data. Sorry I cannot provide the acutal data. I can trap most of the data using a floating trap. My problem occurs with the last column.  Because that last column in row 3 is not relative to the others the floating trap ends up capture the blank space in front of 'mnop'.   Any ideas?

        • Capturing Shifting Data
          Data Kruncher

          Capture Mnop complete with the leading spaces, and in the Table window create a new calculated field to remove them:

           

          Trim(Mnop)[/CODE]

           

          V10 has a cool input option to automatically remove leading and trailing spaces from Character and Memo fields.

            • Capturing Shifting Data
              Grant Perkins

              Kruncher's suggestion is likely the most complete and practical approach.

               

              The requirements of trapping using a floating trap are a little different to the nornal and in effect you need to be able to explicitly describe the start identifier of every field inthe SAMPLE data line. This is the only example (afaiaa) of the sample data being critical to the success of the trapping process. You may have done that of course but its worth pointing it out anyway.

               

              Plan C would be to trap from ijkl to the end of the line then slice and dice in the table. Good approach if the line gets really messy compared to an available sample.

               

              HTH.

               

              Grant

                • Capturing Shifting Data
                  jbvinny _

                  Thanks Grant and Kruncher! 

                   

                  The original suggestion worked. I actually read that on another thread and was working on it as Kruncher repolied.  The other problem I run into with floating is when data runs into other trapped fields.  For now I have just exported to excel (where I am much more efficient) and done some data cleanup.

                   

                  Thanks again!