Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!genrad!teddy!panda!talcott!harvard!seismo!brl-tgr!tgr!ZZZ.RLK%MIT-OZ@MIT-MC.ARPA From: "Robert L. Krawitz"Newsgroups: net.micro.cpm Subject: possible problems with large numbers of open files simultaneously? Message-ID: <7291@brl-tgr.ARPA> Date: Mon, 14-Jan-85 02:03:18 EST Article-I.D.: brl-tgr.7291 Posted: Mon Jan 14 02:03:18 1985 Date-Received: Wed, 16-Jan-85 16:13:06 EST Sender: news@brl-tgr.ARPA Organization: Ballistic Research Lab Lines: 42 Does CP/M do strange things when many files are open and being written at once? I have a program that does this (six files are being written at once, and are therefore open), and a variety of strange behaviours occur, such as the disk write sequential call seems to return errors (non-zero value in the A register) before the disk is actually full. Related question: the documentation for this op (whatever the number is) says that a non-zero value is returned in the A register for a nonsuccessful write due to a full disk. Can this happen for other reasons than a full disk? Examples would be some flavor of write error, etc. When deleting a file, what if anything besides the file name (the first 12 bytes, giving the drive, name, and extension) should be initialized, and to what value? Which should not be? When opening a file for reading, same questions. Does not closing a file after reading it, either partially or totally, cause any problems? What is the best procedure for temporarily closing a file so it can be read from disk in a different FCB, and then reopening it later for writing, at the spot I left off when closing it? I. e. I flush the memory buffers for the six files I mentioned above, close the files, and use a different FCB for reading them. When I read it, I open the file, but never close it. To reopen the file, I save the number of the last record, open the proper extent of the file, and restore the last record number (base+32). To initialize an FCB for creating a file or deleting it, I set the following to zero: bytes 12 through 15, and byte 32 (offset from the base of the FCB). Is this the right thing to do? Should I do this much? What seems to happen is at the time the disk is full, my program seems to delete all the files. It should only delete the oldest generation (that's implicit in the file name). It only calls the routine to do so when the value returned from the write is non-zero. If anyone can help me with this I would be extremely grateful. Robert Krawitz