Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!sdd.hp.com!caen!malgudi!sunc!cis.ohio-state.edu!ucbvax!luvthang.aquin.ori-cal.COM!talmage From: talmage@luvthang.aquin.ori-cal.COM (David W. Talmage) Newsgroups: comp.lang.icon Subject: Increasing the number of concurrently open files Message-ID: <9106111525.AA02419@luvthang.aquin.ori-cal.com> Date: 11 Jun 91 15:25:31 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 90 How many open files can an Icon program have at one time? How can I change this? I'm encountering a limit of about 20 with Amiga Icon version 8.0, February 14, 1990. It looks like I can open 17 files of my own choosing. The remaining three must be &input, &output, and &errout. The documentation tells me of an icont option -SFnnnn where nnnn is the number of files. Is there anything else I must do? I've tried -SF50, for example, with no change. Enclosed, for the curious, is a program that determines how many open files you can have at one time. David Talmage uunet!luvthang!talmage ----- Begin included text ----- # File: OpenFileTest.icn # Author: David W. Talmage # # Usage: iconx OpenFileTest [numfiles] # # OpenFileTest attempts to open numfiles files and keep them all open # at the same time. If it cannot open one of the files, OpenFileTest # reports the name and number of the file. # # OpenFileTest removes all of the files it creates. # # By default, numfiles is 15. # record fileRec( theFilePointer, theFileName ) procedure main( argv ) local aFileRec local fileName local fRecList local numFRecs local openFileCount local j openFileCount := 0 numFRecs := integer( argv[1] ) | 15 fRecList := list() # # CHANGE THE BASE NAME OF THE TEMPORARY FILE TO ONE FITTING YOUR SYSTEM. # every fileName := (tempname("t:xxOFT." ) \ numFRecs) do { aFileRec := fileRec( open( fileName, "w" ), fileName ) | break( write( "OpenFileTest: Can't open ", fileName, ", file #", openFileCount + 1 ) ) openFileCount +:= 1 put( fRecList, aFileRec ) } write( "OpenFileTest: opened ", openFileCount, " concurrently." ) # # Clean up after ourselves. Close and delete each temporary file. # every j := 1 to openFileCount do { close( fRecList[ j ].theFilePointer ) remove( fRecList[ j ].theFileName ) } end # This is a version of Ronald Florence's (ron@mlfarm.com) tempname # generator from post.icn of January 8, 1991. That procedure was # based on Richard Goerwitz's tempname generator, probably the one # named get_dos_tempname in gdl.icn version 1.2. # # tempname() generates a sequence of unique temporary file names with # some common base name. # procedure tempname(basename) local temp_name every temp_name := basename || right(1 to 999,3,"0") do { close(open(temp_name)) & next suspend \temp_name } end