Is there a workaround to error 3078? (Maximum of 128 files open at one time)

Started by CoreyGlenn, December 18, 2014, 09:03:52 AM

Previous topic - Next topic

CoreyGlenn

I am processing large numbers of files in a folder with a single script execution. I am using the FileClose and Drop function to close the filehandle and drop the filehandle's variable after each file is processed. Yet I still get the #3078 error saying Too Many Files open > 128.

I thought maybe I'm not closing out all the files but right after I reach end of file *EOF* I call a routine to FileClose the handle and drop the variable so it's pretty straightforward.
Is there an IntControl around this or is there something that can be read to determine how many files are open in a single script execution?


On a FileOpen function, you are limited to a maximum of 128 files open at one time.
Article ID:   W12996

Filename:   Limitations - Maximum Amounts .txt
File Created: 2010:02:17:10:58:54
Last Updated: 2014:07:18:08:51:38

Thanks,

Corey




td

Calling FileClose on a file handle returned by FileOpen will make the handle table slot available for reuse. Dropping a variable that contains a file handle integer will not.  You may want to check the logic of your script.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

CoreyGlenn

Hi TD,  I've been through my logic a few times tracing through and it would be helpful to verify the filehandle table count. Is there a way to check the filehandle table?


Thanks,
Corey

td

Please see the help file topic for IntControl 77. Requests 20 and 21 can be used to obtain information about the file handle table.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

CoreyGlenn

td....How cool are you man!!!???? Thanks very much!!!

P.S. I learned to look a little harder at the online manual. Sometimes you're not able to hit all the right keywords to search on. I appreciate your support.

Thanks again!

Corey