Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
StrToFile on large text file
Message
 
À
18/06/2008 12:02:02
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01325149
Message ID:
01325166
Vues:
16
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform