Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!hao!ames!ucbcad!pasteur!ucbvax!GALLUA.BITNET!CADS_COLE From: CADS_COLE@GALLUA.BITNET ("Kevin Cole at Gallaudet U. Washington DC") Newsgroups: comp.os.vms Subject: A beginner's C question Message-ID: <8801212141.AA10926@ucbvax.Berkeley.EDU> Date: 20 Jan 88 01:10:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 38 Hi. I'm finally messing with C after promising myself for years that I would learn it. Unfortunately, I don't have ready access to the VAX C manual(s). I SHOULD be getting some soon, (if the cuts to the budget here don't zap me). Anyway, til then, the list is my best resource. Sorry 'bout that. So, here's the scoop. In a nutshell, how do I open a new file for output with the same attributes as an old file already opened for input? I'm writing a compression program that takes an input file and changes multiple spaces to tabs and strips off trailing spaces. I'm probably re-inventing the wheel, but it's a good way to learn. The program seems to be working for the most part. However, upon attempting to edit the created file I get the "... not standard format" message from EDT. The (edited) FILE program output tells me that the only differences are: $ FILE/OUTPUT OLD.MAR /TYPE=VARIABLE /RECORD_SIZE=80 $ FILE/OUTPUT NEW.MAR /TYPE=LFSTREAM /RECORD_SIZE=0 What are the attributes I need in the C fopen? Or is there a better way (for a beginner). (I'm not sure if it's relevant but right now, I'm doing the I/O with getc and putc. I'm also assuming that exiting closes everything nicely for me.) I'm no expert on VMS either. So, no fancy stuff without lots of detail. Thanx in advance. -------------------------------------------------------------------------------- Kevin Cole BITNET: KJCOLE@GALLUA.BITNET Center for Assessment and or Demographic Studies (CADS) CADS_COLE@GALLUA.BITNET Gallaudet Research Institute (GRI) UUCP: ...!psuvax!gallua.bitnet!kjcole Gallaudet University CompuServe: 76167,1406 Washington, D.C. 20002 (202) 651-5575 "Hey Rocky! Watch me pull a rabbit out of my hat!"