Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
StrToFile on large text file
Message
 
To
18/06/2008 12:02:02
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01325149
Message ID:
01325166
Views:
15
Replacing my second TEXT...ENDTEXT with the strtofile, something like this help
* Big assumption here that the line is always the same length
text to lcLine noshow flags 1
---------------------------------------------------------------------------------------------------
endtext

text to lcData noshow flags 1
---------------------------------------------------------------------------------------------------
00000015 Copy this block into a file called Import.txt and put into appropriate Export directory
---------------------------------------------------------------------------------------------------
1,HIPAA,HIPAA,20080102,EXP_00D7280001.TIF
1,Office Notes,Office Notes,20080102,EXP_00D7260001.TIF
1,Prescriptions,Prescriptions,20080102,EXP_00D7160001.TIF
---------------------------------------------------------------------------------------------------
00000016 Copy this block into a file called Import.txt and put into appropriate Export directory
---------------------------------------------------------------------------------------------------
1,HIPAA,HIPAA,20080102,EXP_00D7280001.TIF
1,Office Notes,Office Notes,20080102,EXP_00D7260001.TIF
endtext

do while not Empty(lcData)
	lcHeader	= Strextract(lcData, lcLine, lcLine, 1, 4)
	lcData		= Substr(lcData, Len(lcHeader) + 1)
	lcBody		= Strextract(lcData, '', lcLine, 1)
	if Empty(lcBody) && There were no more lines
		lcBody		= lcData
	endif

       * Do something with lcHeader and lcBody

	lcData		= Substr(lcData, Len(lcBody) + 1)
enddo
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform