DO WHILE .T. DataString = FGETS(nCDataHandle,5000) SELECT FD m.Start = 1 SCAN m.FieldNum = FD.Field_Name FieldData = SUBSTR(DataString,m.Start,FD.Field_Len) FieldNum = IIF(FD.Field_Type = 'N',VAL(m.FieldData),m.FieldData) m.Start = m.Start + FD.Field_Len ENDSCAN INSERT INTO (OutputName) FROM MEMVAR IF FEOF(nCDataHandle) EXIT ENDIF ENDDOFD is a table that contains the field definitions for the input file. It is used to create the table that will contain the data (using the CREATE FROM command) and is also used to parse the text.