Ref: 09330002
Title: File control block (FCB) file access
Date:  7-15-88

Copyright 3Com Corporation, 1991.  All rights reserved.

A software package seems to be writing data in the
wrong file on a 3+ server.  I was able to eliminate the problem
with the DOS config.sys 'FCB=' command.

First a little DOS history for those who don't know what an FCB
is.  Prior to DOS 2.0 all file access was done using DOS
calls that required a file control block (FCB) be allocated for
the file.  This was similar to the way CPM did file access.  After
DOS 2.0 a new set of calls were introduced with only a number
(file handle) used to reference the file.  This is similar to UNIX.
Microsoft has been discouraging the use of FCB's although they
still support the calls. FCB's are particularly limiting on
networks because they don't support file sharing.

On DOS 3.0 and higher when file sharing is used the number of
FCB's that can be open is limited by the config.sys 'FCBS=m,n'
parameter. The 'm' and 'n' are numbers from 1 to 255. 'M' is the
total number of FCBs that can be open;  if you try to open more,
DOS can reuse one of the existing 'm' FCBs.  'N' is a number of
FCB's (less than or equal 'm') that cannot be reused.  The default
is FCBS=4,0.  With this value if you open a 5th file DOS will
reuse the first FCB. If you set FCBS=4,4, an attemped open of a
5th file will fail (4 of the 4 cannot be reused).

Seems that the package I looked at was using a lot of FCB's and
therefore reusing them. Something was getting confused
and the data went into the wrong file.  I changed FCBS to 10,10
and the program still failed but this time with a failure message
on a file open. With FCBS=40,40 everything worked right.

My DOS 3.2 book implies that I should have got a message:
    FCB unavailable
    Abort, Retry, Ignore?
In the original case. This didn't happen and it may be a problem in
the redirector (I'm speculating).

The moral of this long story:  to be safe you should probably
always include an FCBs command in config.sys with equal numbers
(say FCBS=8,8).  If you start having problems opening files, raise
these values.
