Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!lll-lcc!ptsfa!amdahl!rtech!wong From: wong@rtech.UUCP Newsgroups: comp.lang.c Subject: Re: Help needed -> fseek() and ftell() in VMS VAX C Message-ID: <663@rtech.UUCP> Date: Tue, 17-Feb-87 13:25:22 EST Article-I.D.: rtech.663 Posted: Tue Feb 17 13:25:22 1987 Date-Received: Thu, 19-Feb-87 19:18:33 EST References: <384@umnd-cs-gw.umnd-cs.UUCP> Reply-To: wong@rtech.UUCP (J. Wong) Organization: Relational Technology, Alameda CA Lines: 22 In article <384@umnd-cs-gw.umnd-cs.UUCP> jwabik@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. > Yes, indeed. The seek routines for VAX/VMS C work only as expected for byte-stream files (a new file type DEC C supports.) On record files, they do not work the same (although they do do something.) What 'ftell()' does on record files is return the byte offset of the next record! What 'fseek()' does on record files is seek to a given record. You can kind of kludge this to do what you want, but it's not pretty (or even general.) -- J. Wong ucbvax!mtxinu!rtech!wong **************************************************************** You start a conversation, you can't even finish it. You're talking alot, but you're not saying anything. When I have nothing to say, my lips are sealed. Say something once, why say it again. - David Byrne