programming question from a newbie, please help

Hi Everyone, I really hope I could get some insight from a few of you, I've been searching the net for various resources, and this board seems to be the friendliest and most helpful by far.

I work for a medical research company and we use sun 4
and we have different studies that have their own directory
and within the directory we have a file called "interviewers.log"

basically all this file contains if information about the various interviewers such as the start time/ end time , date in which the interviewer conducted the study and so on so forth
an example would be:

89,20021010,16:24:15,project01,interviewer9
87,20021010,16:54:23,project01,interviewer9
89,20021010,17:00:34,project01,interviewer9
87,20021010,17:00:50,project01,interviewer9

the 89 code in the above string is an action code for when an interviewer requests a patient to do an interview with

then in the next field there is the date, 2002 october 10th,
then which project they are currently working out,
and finally which interviewer is working on the study.

basically there are 2 codes we're interested in

89 for the request, and a similar code which is 87 and it represents when the interview is over with.

basically I'm curious if this could even work?

all I really need to do is find a way to declare certain bits of this string to be calculated.

I'm absolutely clueless as to how to do this,

all I really want outputted is the total time
calculated from the 89 codes to the 87's

basically for the first code with 89 add up the time from itself to the next occurance of code 87, and so on so forth, and then output to a final calculation.

I know I probably made this sound very much harder, or stupid, than it should be, I apologize for this in advance, I'm just a young research supervisor who is trying to get some hands on experience, and perhaps go to school to become a programmer,

any insight from anyone would be greatly appreciated,

thanks so much in advance,

Sincerely, Jonathan.

(by the way, these files are very large, so thats why we haven't tried a method like importing these files into excel or something.)

This project is certainly doable. But expect it to take an experienced programmer a couple of days to get everything right. If the data is absolutely perfect this would be fairly easy. But the program must be ready for 87's without a coresponding 89 and vice versa. Also there could be a run of two or more 89's followed by the right number of 87's.

There may not be a need to code this C. A very powerful shell like ksh could handle this. A C program will be fastest though.

But whatever language you pick, this is not a project for someone who is considering becoming a programmer.