programming question from a newbie, please help


 
Thread Tools Search this Thread
Top Forums Programming programming question from a newbie, please help
# 1  
Old 10-11-2002
Data 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.)
# 2  
Old 10-11-2002
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Programming newbie -help!!

Hi I am trying to learn shell script and i ran into an issue. I am trying to read a file with few directories and tar them up. I used a while loop but i end up overwriting tar file with only the last directory in the file being tared . cat test.txt | ( while read line do tar -czPf... (8 Replies)
Discussion started by: SPR
8 Replies

2. UNIX for Dummies Questions & Answers

Newbie needs help with Xlib / X11 programming,dunno who to ask,but you :(

Hi,I'm new here and to Unix also. I'm totall newbie. Here is what I have to do: -Basics of programming user interface with Xlib library -Xlib -Client/Server model of X-Windows system -Example of "Hello world" with button which changes text ,so that when u click displays another... (4 Replies)
Discussion started by: megane16v
4 Replies

3. Fedora

Newbie at Linux Kernel programming!

Hi Friends, This is my first ever post on this forum. I am a new user in the Linux field. Although, I have been working for sometime with CentOS at my work, I would consider myself an amateur only in this field. :D The way file system works in linux and the reason its open-source, has really... (7 Replies)
Discussion started by: rohitrajjain
7 Replies

4. Shell Programming and Scripting

perl newbie . &&..programming newbie

Hi, I am new to programming and also to perl..But i know 'perl' can come to my rescue, But I am stuck at many places and need help..any small help is much appreciated... below is the description of what i intend to acheive with my script. I have a files named in this format... (13 Replies)
Discussion started by: xytiz
13 Replies

5. Shell Programming and Scripting

perl newbie . &&..programming newbie (question 2)

Hello everyone, I am having to do a lot of perl scripting these days and I am learning a lot. I have this problem I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files.. there is folder1\folder2\*.gz and there are about 50 folders... (1 Reply)
Discussion started by: xytiz
1 Replies

6. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

7. Programming

newbie to unix programming in C, needed a few simple prgs on these functions!

Hi all, I am a newbie to unix programming using C.. So i would like to have a few simple C programs to start off with.. I wanted programs on learning , abort,kill and raise,alarm and pause,I would also like to know how to use the vfork() in a prg It would be really great if i can have... (1 Reply)
Discussion started by: wrapster
1 Replies

8. UNIX for Dummies Questions & Answers

newbie question

I am taking a db classes toward oracle 10g. I am taking unix as well . I need to know what is the best option for os . should I use linux fedora. or get a sun box and start learning from there. Thanks (6 Replies)
Discussion started by: xzyan
6 Replies

9. UNIX for Dummies Questions & Answers

Programming Newbie Chick

OK, so I'm trying to finish my last individual assignment for this course, and it's the first time I've visited a forum (I've actually understood UNIX up to this point). I am having trouble with this one. I have to write a program that prompts the user to type their first name and stores it in a... (3 Replies)
Discussion started by: metalgoddess21
3 Replies

10. UNIX for Dummies Questions & Answers

Newbie Question

Hi, I have a file, that is delimited by :: and the purpose of this file is none of your business. ;) There are about 65000 lines in this file, and there are lines that I would like to remove. About 45000 of them. Is there some sort of commands that I can run, to remove word(s) from this... (4 Replies)
Discussion started by: th3gh05t
4 Replies
Login or Register to Ask a Question