A big thank you to Tad Bochan, Stan Sieler and Gavin Scott.
In summary. I was writing to a (pre-built) variable length message file
and then reading it back, but the records were being returned as fixed length
records.
The problem is that you have to OPEN the message file for READ setting
the Foption bits for RECORD FORMAT = VARIABLE LENGTH.
Thus, as Stan stated open it as Fopen(f,%107), but since
I use HPFOPEN, this translated to Item Number = 6 and item value = 1.
What's confusing is that my manual states that this Foption setting
is only applicable at file creation. Mmmmmmmm !
Many thanks again.