4 Replies Latest reply: May 15, 2014 9:57 AM by debijo _ RSS

    Extraction Question

    Lee Ann Bond

      Does anyone have ideas for extracting the "241" between the / /?  Below are five rows from a file that I am working with and I am able to capture the "241" on the first line using a floating trap "/" & appending it to the account number detail(001601317794), but the subsequent lines which have no value in this field are populated by the 241 until a record is found with a new value.  I am using Version 8.


      001601317794    "2,000" "1,100" 674     0.085   0.024   0.061   687/241/      

      000155000599    "7,000" "6,518.67"      697     0.08    0.024   0.056         

      000526600699    500     337.68  676     0.143   0.024   0.119                 

      000574720599    "10,000"        "1,179.94"      693     0.083   0.024   0.059 

      001200880951    "15,000"        885.65  740     0.087   0.073   0.015   803/276

        • Extraction Question
          Bob Cline

          Hi Lee Ann,

          I'd start off by running the file through MSRP replacing the "/" characters with spaces.

          Then reading the newly created file.

          Is that a possibility?


          Having a great time with Monarch in ...

          • Extraction Question
            Grant Perkins

            Hi Lee Ann,


            Append will give you exactly the problem you describe.


            Did you try capturing the field as a detail record field? If so what problems did you get then?


            What is your trap for the detail line? Which character strings do you wish to capture as fields?


            You could consider taking the whole line as a field and then using LSPLIT, RSPLIT, REPLACE, EXTRACT and a few other functions as possible tools to break the field up into the component part required using calculated fields. However the practicality of that idea depends on the answer to the previous question!



            • Extraction Question
              Sunapee _

              Lee Ann, Set the trap on the detail line for the account number, and map the account number field.  Then, create new Footer Template with a floating trap on the / preceding the number you want.  Map the 241 as your second field.  In Table View, You can make a calculated field for the account number and the 241.


              I just tested it and it should work fine for you that way.

              • Extraction Question
                debijo _

                Did you get what you needed???? 


                If not, you could try making the whole line a field (not trying to trap the //) then do a calcuated field and set your / / field, if it's not there then make that calculated field blank.


                Good luck,