Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing a file that's not quite comma-delimited
Message
De
12/07/2007 07:47:10
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
12/07/2007 01:00:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01238841
Message ID:
01239610
Vues:
15
I should have reposted late last night that I figured out that if the cursor/fields were created, then it would populate correctly on the INSERT. Thanks!

>sometimes I am tooo lazy...
>
>>I was playing around with this and can't see how Alltrim(laFields[2]) = "MSH" or whatever segment ID. The laFields array has a row for each segment, but there is only one column and it contains the entire segment value, not parsed elements. I must be missing something...
>
>
>create cursor Curs_MSH ( ;
>    cRecno C(9), cCursType C(5), cSpecialMSH1 C() .. )
>create cursor Curs_EVN ( ;
>    cRecno C(9), cCursType C(5), cSpecialEVN1 C() .. )
>
>lnFlagsAsYouNeedYourdata = 1 && see helpfile on options here
>FOR ix=1 TO alines(laLines,m.lcSample)
>   = alines(laFields, Alltrim(Str(m.ix)) + "|" + laLines[m.ix], lnFlagsAsYouNeedYourdata,"|")
>   Insert into ("Curs_" + Alltrim(laFields[2]) ) from Array laFields
>endfor
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform