>>Alines(laRecord,laLine[m.i])
>
>I don't get this line and how it relates to the code the Peter posted. Can you explain it more?
laLine[m.i] is a string like:
MSH|1|||||Some data|
Alines(laRecord, laLine[m.i],1,'|')
would create an array named laRecord where laRecord[1] correspond to getwordnum(..,1,...).
Directly in that array you could do your type conversions and insert data into your table:
laRecord[4] = converttype( laRecord[4] )
dimension laRecord[1,alen(laRecord)]
insert into myTable from array laRecord
PS: But what I'm actually thinking about is to parse that into 'object' and insert ... name ...
Cetin