>Ed,
>
>I got the data to read into the table, but... When I do this it will read the first 158 characters (the report is 134 char per line) and then it will go to charecter 159 and start loading the second record in to the table. Do I need to set the fread to 268 so that it reads 2 full lines at a time and is there any way that I can filter the records that are read into the table?
>
You can either read 2 lines of 134 characters with two FREADs, or one of 268 characters. Since a VFP string variable can be any length, whatever is easier for you to figure out will work.
It sounds suspiciously like each line might be 132 characters long, terminated with a CHR(13) and a CHR(10) - in which case, you can use FGETS() to read a line at a time up to the CR/LF pair, and if any line is shorter than that, the FGETS() reads up to the length specified or the next end of line. You coudl also do something like:
CREATE CURSOR TempInput (OneRptLine C(132))
APPEND FROM
name of input file TYPE SDF
You could now process the table TempInput, each record of TempInput containing representing one line of the input file. This would be equivalent to doing two FGETS() or two FREAD() operations of 134 characters; for your purposes, since you need to parse data coming from more than one input line at a time, the low-level FGETS() and APPEND...TYPE SDF approaches are roughly equivalent in how they'd work, and if you logically deal with blocks of 268 characters every time, a single FREAD() of 268 characters at a time might make more sense.
The file example I used had fixed length records of 97 characters each - there was no line terminator, so low-level I/O with FREAD() had to be used.
>I appreciate all of the help all of you give me out there. There is not much of a knowledge base here in Japan.
>
>Thanks and Semper Fi,
>
>Jeffrey Score