Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!gatech!gitpyr!roy From: roy@gitpyr.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Truncating MS-DOS files Message-ID: <3105@gitpyr.gatech.EDU> Date: Mon, 16-Feb-87 16:53:23 EST Article-I.D.: gitpyr.3105 Posted: Mon Feb 16 16:53:23 1987 Date-Received: Tue, 17-Feb-87 06:38:28 EST References: <1987Feb15.123004.21019@gpu.utcs.toronto.edu> <2596@well.UUCP> Organization: Georgia Institute of Technology, Atlanta Lines: 27 Summary: Perhaps you could try to be helpful instead of just flaming. In article <2596@well.UUCP>, tenney@well.UUCP (Glenn S. Tenney) writes: > That is exactly the way it is documented! > RTFM: function 28 Random Block Write > ... If CX is zero upon entry, no records are written, but the > file is set to the length specified by the random record field, > whether longer or shorter than the current file size. Well, quite some time ago I also heard that CX=0 on a write would truncate the file. When I became curious about it recently, I looked in the IBM PC-DOS Technical reference manuals for DOS 2.1 and 3.0 (the only ones I had available). I looked in the function documentation distributed to OEM's by Microsoft for MS-DOS 2.0. I also looked in the book "Advanced MS-DOS" by Ray Duncan. None of these sources mentioned a thing about CX=0 being a legal value or not, much less saying that it allows you to truncate a file. I know what RTFM means, and I consider it rude, especially when it involves something as (apparently) obscurely documented as this "feature" of MS-DOS. Perhaps you could give us some clue about WHERE you saw it stated, instead of simply yelling at us for being so ignorant as to overlook the documentation. Thanks for your time. -- Roy J. Mongiovi Systems Analyst Office of Computing Services Georgia Institute of Technology Atlanta GA 30332. (404) 894-4660 ...!{akgua, allegra, amd, hplabs, ihnp4, masscomp, ut-ngp}!gatech!gitpyr!roy