2 Replies Latest reply: May 15, 2014 9:59 AM by Grant Perkins RSS

    help with module

    Stafire_18 _

      I have the following txt but can not get my model to grab the fields because it is not aligned properly. is there something like a floating trap i can use for example see how the below first column is "term" then "grp pln cg throws "12345678" further to the right not keeping it aligned. is there a way i can create a model that will capture this no matter how far to the right it pushes?

       

      ADJUSTMENTS TO AMOUNTS PREVIOUSLY BILLED:  

      TERM 12345678 355585-001-OK01-0010 BBNM9HTA

      TERM 12345678 355585-001-OK01-0010 BBNM6HTA

      TERM 12345678 355585-001-OK01-0010 BBNMVRWA

      TERM 12345678 355585-001-OK01-0010 BBNNSDXA

      TERM 12345678 355585-001-OK01-0010 BBNMVGTA

      GRP PLN CG 12345678 355585-001-OK01-0010 BBN

      TERM 12345678 355585-001-OK01-0010 BBNNMT1A

        • help with module
          Data Kruncher

          In fact, a "floating trap" is exactly what you need.

           

          I set numeric trap characters in columns 6 and 7, and checked the "Floating Trap" option box.

           

          When I defined the first field (TERM or GRP PLN CG) I gave it 11 characters wide, then defined all of the other fields normally.

           

          This extracted the data exactly as you need it.

           

          I used v8 Pro to do this. I don't recall which version introduced floating traps.

           

          Look up "Floating Traps" in the online help for further details of this feature.

           

          Let us know how this works for you.

           

          Kruncher

          • help with module
            Grant Perkins

            Originally posted by Stafire_18:

            [font="courier"]ADJUSTMENTS TO AMOUNTS PREVIOUSLY BILLED:  

            TERM 12345678 355585-001-OK01-0010 BBNM9HTA

            TERM 12345678 355585-001-OK01-0010 BBNM6HTA

            TERM 12345678 355585-001-OK01-0010 BBNMVRWA

            TERM 12345678 355585-001-OK01-0010 BBNNSDXA

            TERM 12345678 355585-001-OK01-0010 BBNMVGTA

            GRP PLN CG 12345678 355585-001-OK01-0010 BBN

            TERM 12345678 355585-001-OK01-0010 BBNNMT1A /font[/quote][/b][/quote]If you can successfully use the spaces as the trap character and have version 7 or 8 then you might be able to get what you want. I think it would work with the data posted, but is it all like that?

             

            If you have a PRO version of Monarch have you considered using the file as a DATABASE and reading it in directly to the table with the space defined as the separator character between the fields?

             

            I would not be surprised if your data presented some challenges with those ideas but they are worth a try.

             

            You could also consider using the PREP utility to re-format the file into fixed width fields and thus make it easier to work with as a 'report' file.

             

            Do those ideas help at all?

             

             

            Grant