Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing a file that's not quite comma-delimited
Message
From
11/07/2007 18:23:55
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
11/07/2007 14:04:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01238841
Message ID:
01239535
Views:
25
>>>>>If you create specialized LineToObject methods that match with field namings of target tables then you'd directly do an insert into in those methods. The one I wrote is a generic parser.
>>>>
>>>>Sweet! What is the best way to insert into a cursor from an object?
>>>
>>>I still warn you. The string you are attempting to parse is a medical HL7 delimited string. This format has expanded and become VERY complicated to parse. Image a five dimensional spare string array. If you have not heard of this, you may have trouble getting your mind around HL7. Strongly requimend Google'ing for HL7 format and HL7 parser.
>>>
>>>P.S. I once attempting to write a parser myself and finally used a existing parser after wasting over a month trying to prefect it.
>>
>>Not seeing what's so tough about it. You run through the lines, run through the segments, etc. With help, I've aleady got each line into it's own object. Just a matter of getting that into cursors, using a data dictionary to handle the mapping from the cursors to the correct table/field. Not easy, and kind of tedious, but doesn't seem incredibly hard. Not much different than importing comma-delimited data really, just have more hoops to jump through. Or did I miss your point?
>
>Yes, you got my point.

Were you being serious? I was. I want to know if what I posted above was a correct assumption, or is there much more to this that I'm not seeing, but you are aware of?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform