Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!panda!genrad!decvax!ucbvax!ti-eg.CSNET"!"MCCORE::BOLTHOUSE From: "MCCORE::BOLTHOUSE@ti-eg.CSNET".UUCP Newsgroups: mod.computers.vax Subject: Eliminating CR/LF from output to a terminal Message-ID: <8704070738.AA01727@ucbvax.Berkeley.EDU> Date: Mon, 6-Apr-87 09:35:00 EST Article-I.D.: ucbvax.8704070738.AA01727 Posted: Mon Apr 6 09:35:00 1987 Date-Received: Wed, 8-Apr-87 06:27:08 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 37 Approved: info-vax@sri-kl.arpa VAXC tends to use awful default RMS characteristics for stdout if your interest is writing binary data. I use the following open() sequences for writing: #ifdef VMS #define text_open(fd,str,flags,mod) fd = open(str,flags,mod,\ "rfm=var","rat=cr","mbf=2","mbc=51") #define binary_open(fd,str,flags,mod) fd = open(str,flags,mod,\ "rfm=var","mbf=2","mbc=51") #endif I also define appropriate macros for non-VMS environments. Note the absence of the "rat=cr" in the binary_open macro; the default is "rat=null", I think. Anyway, this works nicely for binary data for me. Note the same approach can be used with fopen(), freopen(), creat(), and so forth. I tend to prefer using variable-length records on VMS for text; this could be debated :-). Oh, the "mbf=2" means RMS should use 2 buffers (generally makes processing go faster on machines with sufficient memory, slower on constricted machines). This makes my code go *much* faster. The "mbc=51" means RMS should grab 51 blocks at a time, which is the number of blocks/track on an RA81. I'm not as convinced about the speed increase for the "mbc=" parameter as with the "mbf=" parameter, although empirical data (PCA) definitely indicates fewer IOs are taking place with "mbc=51". Again, if you're working with memory-poor machines, this may not be a good idea. Also, if you have badly fragmented disks, neither of these 'tweaks' is likely to help your performance much. david l. bolthouse texas instruments defense electronics information systems VAX system support ma bell: 214.952.2059 csnet: bolthouse%mccore@ti-eg arpa: bolthouse%mccore@ti-eg.csnet Disclaimer: you know by now my employer doesn't necessarily agree with what I think...