Help needed -> fseek() and ftell() in VMS VAX C

forrest at blia.UUCP forrest at blia.UUCP
Fri Feb 13 03:23:32 AEST 1987


In article <384 at umnd-cs-gw.umnd-cs.UUCP>, jwabik at umnd-cs.UUCP (Jeff Wabik) writes:
> I'm trying to fseek my way around a large (1.5MB) file using VAX VMS C,
> and am having absolutely NO LUCK.  
> 

Beware that seeking in non-stream files in VMS doesn't work the
way you'd expect based on Unix experiences. (See page 15-15 of the
"Programming in C" Manual.) If you think about it,
this makes sense for variable length record length files since you
have to know the record length for each record to be able to seek
over it. Although they could have provided a slow method for doing
forward seeking, doing backward seeking would be more trouble
than it's worth. Unix would have the same problem if they used
variable length record files, I believe.

What pisses me off is that seeking also doesn't work right with fixed
length record files. I don't understand the reasoning behind this.

Jon Forrest
ucbvax!mtxinu!blia!forrest



More information about the Comp.lang.c mailing list