[windows2000] Re: Text file parsing

  • From: "Sullivan, Glenn" <GSullivan@xxxxxxxxxxxxxx>
  • To: "'windows2000@xxxxxxxxxxxxx'" <windows2000@xxxxxxxxxxxxx>
  • Date: Mon, 12 May 2003 15:14:17 -0400

Rick,

Is the format always the same?  i.e.... is there always the same number of
lines of address, the same number of lines of phone number, and one line (I
am assuming the detail lines wrapped) for each line item?

.vbs can do what you want...

Open a text file for input.  Read each line, and depending on which number
line it is, parse it appropriately.

Email an example text file to me as an attachment and I will whip something
up for you to at least be able to play with.

Glenn Sullivan, MCSE+I  MCDBA
David Clark Company Inc.


-----Original Message-----
From: Rick Fogarty [mailto:rick@xxxxxxxxxxxxx]
Sent: Monday, May 12, 2003 2:58 PM
To: W2K
Subject: [windows2000] Text file parsing


This is more of a general programming question, but I thought I'd ask here
due to the knowledge.
 
I have the following text file that looks like this:

FIRST M. LAST
 
STREET
 
TOWN  NC  28327
 
XXX-XX-9533                 05/07/2003
 
 
 

EDU 3066    8802054  EFFECTIVE TEACHER TRAINING            09/06/88 11/08/88
30  S    3.0
EDP 3007    9002077  INTRO TO WORD PROCESSING               09/12/90
10/24/90   21  S    2.1
EDP 3007    9002071  ADVANCED WORD PROCESSING           10/31/90 12/05/90
21  S    2.1
EDU 3050    9101044  TEACHER RENEWAL PACKAGE              06/04/91 06/27/91
24  S    0.0
EDU 3066    9101065  CLASSROOM MOTIVATION AND DIS    07/08/91 07/11/91     0
S    0.0
EDU 3068    9103009  THE ADOLESCENT
10/29/91 12/10/91   21  S    2.1
EDU 3068    9103053  PARENTING
01/07/92 03/10/92   30  S    3.0
 
I need to parse this and place it into a db...  Any suggestions?
Thanks,
Rick
 
==========================================================================
Rick Fogarty
Coordinator, Technical Support and Computer Servicing
Sandhills Community College
3395 Airport Rd
Pinehurst, NC 28374
1(910) 695-3943
Fax 1(910)695-1823
rick@xxxxxxxxxxxxx
http://www.sandhills.edu <http://www.sandhills.edu/> 
==========================================================================
 


==================================
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

==================================
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: