OS2 World.Com Forum

Subject  :  How to increase Filehandles for OS/2 Session
Author  :  Jan jan.van.dijk@asm.com
Date  :  18 Nov, 2005 on 14:02
Does any one know how to increase the number of open files per OS/2 session?
I have seen there is a config.sys setting FILES=20 but this only applies to DOS sessions.

In OS/2 sessions we need to enlarge the amount of simultanius open files because 20 is not enough in some cases. Is there some config.sys option to set this amount?


Subject  :  Re:How to increase Filehandles for OS/2 Session
Author  :  hausmaus
Date  :  19 Nov, 2005 on 03:29
I'm thinking this might be what you're looking for:

From:
http://www.markcrocker.com/rexxtipsntricks/rxtt28.2.0795.html

SET SHELLHANDLESINC=n
Increment the number of file handles available to a shell process
(e.g. a REXX program started by the CMD.EXE) by the amount of n. (see
also Maximum files per session; tested only in WARP 4 with Fixpack #6)

You might also want to check out:

http://www.markcrocker.com/rexxtipsntricks/rxtt28.2.0177.html

That page contains information about just how high you can really put that statement.

HTH,
Sean


Subject  :  Re:How to increase Filehandles for OS/2 Session
Author  :  Jan jan.van.dijk@asm.com
Date  :  19 Nov, 2005 on 12:51

hausmaus (19 Nov, 2005 03:29):
I'm thinking this might be what you're looking for:

From:
http://www.markcrocker.com/rexxtipsntricks/rxtt28.2.0795.html

SET SHELLHANDLESINC=n
Increment the number of file handles available to a shell process
(e.g. a REXX program started by the CMD.EXE) by the amount of n. (see
also Maximum files per session; tested only in WARP 4 with Fixpack #6)

You might also want to check out:

http://www.markcrocker.com/rexxtipsntricks/rxtt28.2.0177.html

That page contains information about just how high you can really put that statement.

HTH,
Sean



Thanks, this really works fine, this was exactly what I was looking for.
However I still like to know how OS/2 handles message files, because I investigated the program (written in C) that was causing the problem of not having enough filehandles had several message files open, and the only api call that is used however is DosGetMessage(). Is it possible to close the message file?
Also I modified the program in such way that at the very beginning in a loop several files where opened. Of those files I displayed the file handles of the open file if opened succesfully, and observed a jump in the filehandle numbering: after filehandle 7 was opened the next file handle was 13, is this due to the messagefiles that are used? Can any one give me an explanation for this?

Thanks,

Jan


Powered by UltraBoard 2000 <www.ub2k.com>