Import .csv file and process
I need to write a windows app (vb 2005) that does following:
1. Imports a .csv file
2. Selects certain rows from the .csv file
3. Splits the .csv file into fields based on delimiter
4. Populate a db2/400 table with only some of the fields.
Example of rows:
061000104,6607607911512,Pavex Corporation,20091005,100,33824.59,,,Total Credits
061000104,6607607911512,Pavex Corporation,20091005,400,33824.59,,,Total Debits
061000104,6607607911512,Pavex Corporation,20091005,478,33824.59,,,Total Cpr Paid Checks
061000104,6607607911512,Pavex Corporation,20091005,275,33824.59,ZBC0627008000093 , ,ZBA Credit
061000104,6607607911512,Pavex Corporation,20091005,472,33824.59,SUDR000000000000 , ,Debit For List Post Summary
061000104,6607607911512,Pavex Corporation,20091005,479,19935.00,CPRP0097280285I, 53544,CPR Paid Check
061000104,6607607911512,Pavex Corporation,20091005,479,37.83,CPRP0095037189I,535 50,CPR Paid Check
061000104,6607607911512,Pavex Corporation,20091005,479,575.00,CPRP0096056850I,53 561,CPR Paid Check
Need to select only rows with "Paid Check". Field3, field4, field5, field6 and field7 only will be inserted into the db2/400 table.
Does anyone have code sample I could use? Thank you.
|