I've been doing a bit more digging and discovered that:
The data file I'm interested in , and creates a problem, terminates the lines with just 0x0a (LF).
Whereas the short test file terminates the lines with 0x0d, 0x0a (CR,LF) and is fine.
Now I would have thought in this day and age standard libraries would have been able to handle the dos/unix difference. Apparently not!
An abbreviated file of test data is attached for anyone interested. Run the test program on it and see the fgetpos problem; Remove a few lines; rerun the test program and watch the file position move.
Anyone got any suggestions, short of reformatting all current and future data files?