home *** CD-ROM | disk | FTP | other *** search
- During the past week there has been more rumors and rumblings about
- the DOS share program. Here is some information and comments which may
- clarify its use and function..
- SHARE performs two somewhat related functions. It is called SHARE because
- it handles file sharing in DOS based networks. It also provides support for
- large hard drives. Why are these functions so closely related?
- In DOS versions before 2.0 (when file handles were introduced) it was the
- application software's responsibility to maintain an area of memory for file
- I/O (i.e. FCB [file control block]). Unfortunately, if the application
- maintains complete control of the FCB it becomes difficult for DOS to
- change or implement new features (like device redirection) so Microsoft
- decided that THEY should have control of all internal file structures. With
- that, file handles accessed through strictly controlled function calls
- were born.
- However, what to do about all those old programs that used internal FCBs?
- Well, Microsoft continued to support the old method of file I/O, continually
- warning developers that the new file handle technique was the STRONGLY
- RECCOMENDED method approach in future software. This situation was not too
- much of a problem until DOS 3.0 tried to implement file sharing and locking.
- Microsoft found it virtually impossible to share files when the FCBs were
- being stored somewhere in the application software, so bad was the situation
- in testing that Microsoft dropped file sharing from the OS in 3.0 and
- implemented a major "patch" in DOS 3.1 with the SHARE command. Basically,
- SHARE achieves file sharing with old FCB based programs by creating a seperate
- FCB internal to DOS with extended information and using the SHARE FCB to
- correctly share files and lock records. SHARE only creates an internal FCB
- if the application uses FCBs on a network. However, two FCBs will be in use
- where only one was before so more will be needed in a network environment.
- Programs which use file handles DO NOT apply at all to this discussion.
- (SHARE does support file handle sharing, but was not originally intended to)
- There are reports that SHARE creates or uses FCBs when it does not have to,
- but these claims are not true. However, there is a slight chance that DOS
- will create an internal FCB and use it temporarily even with modern file I/O
- techniqiues. I believe this is true but is not related to SHARE or networks.
- Okay, enough about SHARE in file sharing situations. What about its need in
- large partitions?
- It just so happens that the original FCB devised for DOS 1.0 had an internal
- pointer limitation of 32mb. That is, the internal pointer for the current
- file position in an old FCB could only address places below 32mb. When a
- portion of a file was being accessed beyond the boundary DOS would not report
- an error but just roll over the pointer to point to an incorrect place in the
- first 32mb area. Subsequent reads or writes promptly and blindly corrupted
- the hard drive! Oh no..
- Fortunately, the solution to the blind pointer problem was for DOS to take
- control of the FCBs which SHARE was already doing for unrelated reasons.
- Microsoft used the functionality of SHARE to overcome this pointer rollover
- problem in the extended internal FCB created by SHARE. So even in non network
- computers with large hard drives, SHARE creates internal FCBs for programs
- that require them. That is how the two SHARE functions are related.
-
- You should NEVER ignore the SHARE warning in an operating computer regardless
- of the status of the network. Myself and many of my associates have ignored
- this message when restoring files or installing LANtastic on brand new
- systems with impunity. (DOS COPY and XCOPY don't use FCBs) However, I now
- make sure to run it whenever it is requested.
- Incidentally, Microsoft thought it was SO IMPORTANT to run SHARE that if you
- fail to put SHARE in your CONFIG.SYS or AUTOEXEC.BAT, DOS will STILL make
- an attempt to search the root directory of the boot drive, and if the SHARE
- program happens to be residing there will LOAD IT! (Note that it will do
- this with any program in the root that is called SHARE.EXE if SHARE is not
- run by the previous two means.) In addition, some versions of DOS 4.01 and
- below ignore SHARE command line parameters (the /F and /L stuff) if SHARE is
- run from the command prompt or AUTOEXEC.BAT. So put your SHARE in the
- CONFIG.SYS file for proper instalation.
- I hope this was enlightening and helpful. While I believe the information
- contained in this document to be true, I am only a harried human being. I
- accept no responsibility for the results of the use of this information. I
- also do not believe that any information contained here violates any IBM or
- Microsoft non-disclosure agreement. Thanks a million to the midnight guys at
- Lotus Development and Mr. Mike R. Sofft.
-
- Tom Filliman, Fillimerica Incorporated...