[comp.sys.ibm.pc] As if by MAGIC, it doesnt work anymore

philip@amdcad.AMD.COM (Philip Freidin) (06/01/88)

A little problem has happend to me and I dont know what it means.

Here is the situation:

	config.sys  has FILES=20 in it
	only TSR's are CED, RMAP, logimouse MENU and CLICK, and MARK.
		(none of these do anything with files)
	MS-DOS is an unmodified version 3.1, has been running fine for
		atleast a year
	Disk is maxtor 1140 (120 MB)
	Application program is 'BIGSORT' a sort program that handles
		quite large textfiles and does sorting. It does disk
		based sorting, so memory size is not a limit on the
		file to be sorted. It opens 8 temporary files. The
		data file slowly grows as I append data to it each
		week. It is now about 589K long. This file is fed to
		BIGSORT, and the output is a sepparate file that is
		the sort output. I.E. Everything gets sorted each
		time. I dont keep the result of the previous sort.
		This software has worked fine up until last sunday.

Here's what has happened:

	It doesnt' work anymore. The program runs out of file handles
	before it opens all of its temporaries. changing FILES in the
	config.sys file to 22 makes it work again.

Hers's what I've tried:

	Booted off a write protected floppy, no config.sys or
	autoexec.bat file, so no TSR's, and virus free version of dos
	3.1 and it still crashed.

	Recompiled BIGSORT, booted off floppy and it crashed.

	Recompiled BIGSORT, booted off hard disk (with TSR's etc),
		and it crashed.

	Changed config.sys to contain FILES=22, booted off hard disk
	(with TSR's etc) and it worked ok.

	Cut source data file back to about 340K, (i.e. size of several
	months ago, used to sort ok) booted off hard disk, it crashed,
	set FILES=22, and it worked.

So:
	
	It isn't the copy of DOS.
	It isn't the TSR's
	It isn't the BIGSORT program
	It isn't the size of the data file
	It isn't the ammount of free space on disk (about 15MB)
	It doesn't appear to be a virus
	There is a quick fix that works
	I don't understand what has happened.

Is there anyway to interogate MS-DOS to find out the number of unused
file handles?

Any help would be appreciated.

Philip Freidin.

Robert_C_Tellefson@cup.portal.com (06/01/88)

I have a small program that I use for just such occasions that reports
the next available file handle number.  When run from the DOS prompt
this is usually number 5 (unless some TSR is holding a file open).

I tried to email this message to you without success.  My location
didn't recognize your domain.  If we can connect, I'd be glad to send
you a copy of this simple program (only 8k).  Since this is something
that I wrote for our inhouse use here, it can be easily ammended to
report all available handles if needed.

You've got my curiosity going.  I'd like to hear the outcome.

Bob Tellefson                    uucp:  tellefson@cup.portal.com
RCT Design                 Compuserve:  73417,545
                                Genie:  R.TELLEFSON
                                Voice:  (408) 749-9826