Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using information from one file to find it in another
Message
 
 
À
26/06/2008 10:07:58
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:
01326927
Message ID:
01326933
Vues:
20
>I'm trying to find a way to look for all lines in a log file that had errors and then look in the source file to extract the actual line that was processed, causing the error. Finding the occurrences of the errors and extracting out the line number isn't too tough, but how then to get to that line in the 2nd file?
>
>
>Log File:
>
>06/25/2008 3:08:22 PM	Error	Line 1531 - Syntax error or access violation
>
>
>Source:
>
>3224,Medical History,PT'S MEDICAL RECORDS,20080328,EXP_00FCDB0001.TIF
>
If the source file is not huge, you can get it to string with FILETOSTR(), then to array with ALINES() and get this line.

That's a quick idea and it may be not the most efficient way.

Another way would be to get this file into the cursor / table (using APPEND from TYPE SDF). This would pull out first 254 chars, I think, of the line.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform