Loading ...
Sorry, an error occurred while loading the content.

11121reg exp & clip solution

Expand Messages
  • BHCS
    Oct 31, 2003
      I need some help with the following problem: I get several csv files
      from employees/contractors periodically in this form (exported from a
      Palm app)...

      "Consult","Talk to Pam re JM >
      1hr","IMCO","Office","07/11/2003","00859.9","00861.6","1.7"
      "Consult","Missed Foster/A&L re software > n/c
      ","CCACPC","IMCO","07/11/2003","00861.6","00876.5","14.9"
      "Trblshoot/repair","Took Caroles sys to shop for repairs/upgrades >
      .75hr","Design Res.","CCACPC","07/11/2003","00876.5","00878.9","2.4"
      "Consult","re Win vs Linux server opts > 2hrs","Mather Agency","Design
      Res.","07/11/2003","00878.9","00879.3",".4"
      "Cinco fillup.","$14.85/9.1g/$1.639/ck","Sunset ARCO","Mather
      Agency","07/11/2003","00879.3","00889.2","9.9"

      Currently I import them into a dbms (Alpha5v5), massage them, generate
      reports, post the reports to a new table & then export to use in an
      accounting/billing prog. This has too many steps. All I really need to
      do is parse them & select each record (line) that meets the criteria &
      write/move the selected to a new file. I think this is a combination of
      reg exp & clip language.

      Does anyone know of a clip already in existence that does something
      similar that I could modify for my use? Specifically, here's what I need
      to do:
      1. Each csv file covers a month of client visits & usually has about
      110+ lines (records)
      2. The 3rd field is the important field that indicates what client was
      visited
      3. I want to search for all lines where the 3rd field = a specific
      value (eg, IMCO in the first line of the abv example)
      3b. Note that the reg exp/clip must only select a line if the value is
      in the 3rd field, making sure to NOT to select if the value is in the
      4th field;
      4. Select all the lines that meet that criteria / cut them /open a new
      file / paste the cut records into this new file
      5. Open a 'Save As' dialog with a suggested filename based on the
      search criteria (eg, IMCO.txt) with the Save To folder the one I put
      these records in (eg, R:\Clients\BillableHrs\)
      6. I don't, however, want it to auto save it as I want to edit the
      file name to include billing period (eg, IMCO_Jan04.txt) before I save it.

      Any help would be appreciated.

      Thanks,

      Bill
    • Show all 5 messages in this topic