Path: utzoo!attcan!uunet!sdrc!scjones From: scjones@sdrc.UUCP (Larry Jones) Newsgroups: comp.lang.c Subject: Re: VMS C & records in files Summary: use STANDARD io Message-ID: <350@sdrc.UUCP> Date: 18 Aug 88 21:20:45 GMT References: <196@rna.UUCP> <6671@bloom-beacon.MIT.EDU> <1609@edison.GE.COM> Organization: Structural Dynamics Research Corp., Cincinnati Lines: 22 In article <1609@edison.GE.COM>, rja@edison.GE.COM (rja) writes: > I'm not aware of any solution to the problem of VMS file types. The > problem is precisely that VMS is so record-oriented. Even nominal > text files don't work like UNIX. We find that we have to use a loop of > successive calls to read() to fill (for example) a 512 byte buffer > because it gives only 1 record at a time even though you asked for 512 > bytes. :-( > UNIX and even MS-DOS will let you read 512 bytes in a chunk so it's VMS > that is brain-damaged in this case. > > If anyone hears of a SOLUTION to this problem with VMS C, please e-mail > me the details. The solution is to use STANDARD io instead of system-dependent calls like read. If you use fread instead of read all works wonderfully. ---- Larry Jones UUCP: uunet!sdrc!scjones SDRC scjones@sdrc 2000 Eastman Dr. BIX: ltl Milford, OH 45150 AT&T: (513) 576-2070 Nancy Reagan on superconductivity: "Just say mho."