>Thanks Hilmar,
>I am familiar with basic delimited text imports but this file format
>is kind of tricky. It is '~','*', and '<' delimited and does
>all sorts of multiple loops throughout. Each record has a unique identifier
>which is a 2 or 3 letter code so I was planning on using
>those codes to perform all the functions. not sure if I am going to do
>all the coversion from the file itself or import to cursor and perform
>functions from their..we'll see.
>
>thanks again...
>Ronnie
Let's say each record is on a separate line, in a text file.
Read each line.
Use at() to search for a specific delimiter. Save the position to a variable.
Read all characters up to the delimiter. Copy remaining line back to current line.
Example:
lnPosition = at("~", lcCurrentLine)
replace Field1 with left(lcCurrentLine,lnPosition - 1)
lcCurrentLine = substr(lcCurrentLine, lnPosition + 1)
To actually get the file into memory, use FileToStr(). To separate into lines, use alines().
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)