Open and extract info from file with .asc extension
Posted on 2002-03-07
Guys, I need to write a program to check the time employees come to work and go back home. My company uses a system which keep tracks of anyone going in and out everyday thus the number of transactions at the end of the day will be in thousands. The system is able to export the transactions into a file with .asc extension but basically it's a text file. I've opened it in Windows and checked.
My problem is I need to write a program to open that file and extract the info in it. The text in it are kinda jumbled up, looks something like this :
ProdEntr03011929009917Abd Khalid 00013 QA Senior E0
Entrance03011459012697Chia Soo Zern V12697 Vendor None 0
Cantin 03010838013511Chan Su Chen 00012 QA Incoming0
FinalVis03010956021486TPV 001 TPV 001 ProductiTrainee 0
Receptio03010843018356See Yong Sian 00014 ProductiEngineer0
These r 5 examples which is suppose to look like this:
ProdEntr(door) 0301(date) 1929(time) 009917(card no) Abd Khalid(name) 00013(emp no) QA(dept) Senior E(position).
I've explained what they mean in brackets so u guys know.
The last character(O) is ignored.
Then, I will have to pick out the first time they enter and the last time they leave as there can be lots of going in and out.
I have other criterias to fulfill but will let u guys know when someone gives some suggestions or ask for them. I'm not asking anyone to do for me but would be great haha...just some help on how to do it. I have ideas on what I need from the program but not sure how to do it.
Have only 3 weeks to do this..****....More info will be provided upon request.