WmFlatFileProblem

I have a curious flat file problem. I’ve created the file definition and verified it carefully. When I read the file, using either the Test facility (tab) or using the file polling process, the first record in the file is omitted. All other records are processed correctly. If I move the first record to the end of the file, then the new first record is omitted.

I’ve defined the file as delimited (I’ve been unable to get fixed length to work even though the file consists of is 372 byte records, each followed by a newline), with the delimiter being a newline.

One other point: If I start the file with a newline, all the records, including the first one, are processed successfully. This suggests WmFlatFile expects a delimited file to contain records that are surrounded by delimiters rather than delimited by them. Can that be right???

Has anyone seen this before. Any suggestions?

Dave Matlock
david.matlock@eaiconcepts.com

Dave,

I think your problem is the newline character in the file.
Verify what that actually is. It could be either CR/LF or either one of them. I’ve encounter this before and it’s usually when you’re moving files between UNIX and Windows. If you’re processing the file in Windows view the file using debug but you will have to rename the file to the 8.3 format for debug to read it. If you have UltraEdit that should work also.
Then try the different record delimiters to match what you find.

HTH

Chris,

Thanks for the tip. You were not quite right, but close enough to lead me to the solution. The file in question had a Unicode header on it (FFFE) that was invisible in most programs (like notepad), but showed up immediately with a hex browser. Once that header was removed, the problem was solved. Seems to me the WM file handler should have recognized and correctly processed the record (UTF-8), but not so…

Thanks again.