home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
m
/
mastlkt.zip
/
DOCS.EXE
/
pak
/
DATAPATH.DOC
< prev
next >
Wrap
Text File
|
1987-02-24
|
12KB
|
426 lines
DataPath 1.6
by
Bruce Dubbs
GDC Software
122 Valencia Dr.
Universal City, TX 78148
DataPath Topics
Purpose.....................................2
System Requirements.........................2
How to use DataPath.........................2
Examples....................................3
Features....................................5
Technical Details...........................6
Limitations.................................7
References..................................7
Disclaimer..................................8
Modification History........................9
Suggestions for use........................10
Page 2 DataPath - GDC Software
Purpose
DataPath is used to specify directories, other than the current
one, to be searched by executing programs, in the event that a file
that needs to be read cannot be found in the current directory.
System Requirements
DataPath requires 2327 bytes of disk space ( 5 512-byte sectors).
It becomes memory resident the first time it is run and increases the
size of the operating system by 1456 bytes. It will run on any com-
puter using the MS-DOS or PC-DOS operating systems version 2.0 or
higher.
How to use DataPath
Entry Form
DATAPATH [d:][pathname [;[d:]pathname]...][/x]
where 'd' is the letter of the designated disk drive; and
pathname' is a sequence of characters of the form:
[\][directory][\directory...][\]
Optionally you may use the MS-DOS shorthand notation
shown below in lieu of 'directory':
. MS-DOS uses this shorthand symbol to indicate the name
of the current working directory. MS-DOS automati-
cally creates this entry when a directory is made.
.. MS-DOS uses this shorthand symbol to indicate the name
of the current directory's parent directory. MS-DOS
automatically creates this entry when a directory is
made.
Note: The two shorthand symbols do not exist in the root
directory.
/x is one or more of the following switches:
/V, verbose mode, or
/Q, quiet mode, or
/R, allow file opens for read only, or
/W, allow file opens for read or write, or
/C, clear the current DataPath, or
/H, display help information.
Page 3 DataPath - GDC Software
Example 1
If you are in directory \DATA and you want to use your
copy of dBASE II which is in subdirectory \DBASE to work on
data in your current directory, use the following sequence of
commands:
DATAPATH \DBASE<return>
PATH \DBASE<return>
DBASE<return>
Example 2
If you want to see the current DataPath, type:
DATAPATH<return>
The current DataPath will be displayed.
Example 3
If you want to disable DataPath type:
DATAPATH /C <return>
Example 4
If you have all your DOS programs on a subdirectory named
\DOS, Lotus 123 files in a subdirectory named \LOTUS, dBase
files in a subdirectory named \DBASE, and an editor in a sub-
directory named \EDITOR, and you want to access any of the
programs from any subdirectory, use the following sequence:
PATH \DOS;\LOTUS;\DBASE;\EDITOR
DATAPATH \DOS;\LOTUS;\DBASE;\EDITOR
Note: This configuration will add a noticeable time delay
to most applications that read files and to COMMAND.COM find-
ing most programs. Using batch files to set PATH and DataPath
is a much cleaner and quicker method.
Page 4 DataPath - GDC Software
Example 5
If your programs are on disk A and your data is on disk B,
use this sequence:
PATH A:
DATAPATH A:
or alternatively to search both disks from either loca-
tion:
PATH A:;B:
DATAPATH A:;B:
This example assumes that all files on drives A and B are
in the root directory. Subdirectories are not of great use
on 360K floppy disks, however, DataPath will work properly on
floppy diskettes.
Example 6
You want to enable spelling dictionary files on subdirec-
tory \WORD to be accessed when opened for writing and you
want to suppress the DataPath messages:
DATAPATH C:\WORD/W/Q
Messages will remain suppressed until verbose mode is
reset.
Example 7
You want to reset DataPath to search the \BIN subdirec-
tory, disable opens for read, and reset verbose mode.
DATAPATH C:\BIN/V/R
Example 8
You want to display quick help information about the data
path and its switches.
DATAPATH /h
The data path will not be updated if the /h switch is pre-
sent.
Page 5 DataPath - GDC Software
Features
DataPath supports the following features:
1. DataPath will ignore invalid drives or path specifica-
tions.
2. DataPath has a very small size. When installed, it
uses only 1440 bytes of RAM.
3. DataPath will skip over a drive listed in the DataPath
if the drive door is left open. You will have to wait for
the disk to time out, however. You will get the normal
Abort, Retry, Ignore command if the default drive door is
open.
4. THE SOURCE TO DataPath IS RELEASED TO THE PUBLIC
DOMAIN!
5. DataPath works on any MS-DOS or PC-DOS system. (Ver-
sion 2.0 or higher.) It is not dependent on hardware.
6. DataPath is compatible with CP/M style function calls
in MS-DOS for older programs such as dBase II.
Page 6 DataPath - GDC Software
Technical Details
DataPath was written in assembly language and was optim-
ized for both small size and fast operation. The source for
the program is in the file DP16.ASM.
DataPath works by intercepting three different function
calls to the operating system. These are 'OPEN', 'FILE
SIZE', and 'OPEN FILE HANDLE'. The usual call within MS-DOS
now is 'OPEN FILE HANDLE', but some programs use the older
functions. Lotus 1-2-3 Version 1A, for instance, uses 'FILE
SIZE' to open a file.
DataPath also intercepts older CP/M style call to the
operating system, converts the calls to MS-DOS calls, and
executes accordingly. The dBase II program uses this method.
DataPath uses the 256 byte PSP (program segment prefix)
that is left resident when the program installs itself. It
uses the space for storing the DataPath and for working
space.
The program logic for DataPath is as follows:
1. If DataPath is not interested in the function, pass it
to DOS undisturbed.
2. Try the function. If successful, return to the call-
ing program.
3. If the file is to be opened for writing and the /R
option (open for read only) is in effect, return.
4. If the path of the desired file is specified, return.
If the program knows enough to specify a path, DataPath will
not interfere. DataPath WILL search if only the disk drive is
specified.
5. Search for the file along the DataPath. If not found,
return the error code found in step 2. If found, complete
the function and return to the calling program.
Page 7 DataPath - GDC Software
Limitations
Listed below are the known limitations of DataPath:
1. The maximum length of the DataPath string is 125 char-
acters. This is due to the 127 character limitation MS-DOS
puts on input strings.
2. DataPath cannot be uninstalled without rebooting the
system. This should not be a problem because of its small
size. DataPath can be disabled by clearing the DataPath.
3. The DataPath will not accept wildcards. They will be
ignored.
4. DataPath will not create aliases for pathnames.
5. DataPath will not automatically search subdirectories
beneath the specified directory.
References
The following magazine article contains information on
utilities that do the same function as DataPath:
PC Tech Journal - April 1985 - pp 139-145.
"File Search Help for PC-DOS" by Arthur A. Gleckler
The following magazine article contains general informa-
tion on resident utilities:
PC World - June 1986 - pp 270-284.
"Battle for the Background" by Bruce Owen
The following programs perform the same basic function as
DataPath. They contain different features, however their
basic intent is the same as DataPath.
DPath30 - Public Domain - No source
FilePath - Commercial - $ 37.50
Scout - Commercial - $ 29.95
SuperPATH - Commercial - $ 39.95
EasyPath - Commercial - $100.00
Page 8 DataPath - GDC Software
Disclaimer
There is no copyright associated with this program. It
is, however, intended for private noncommercial distribution
only. You may make copies freely and use the source code in
any manner that you wish. Please do not charge anyone for
this program. It is free.
This software is not warranted in any manner. No guaran-
tee is made that the program operates as it was designed. I
will not be liable for any damages that may occur by using
this program. If you use the program, you agree to this.
Any comments, suggestions, or criticisms are welcome.
Examples of conflicts with other memory resident utilities or
the inability of DataPath to work with a particular program
are especially welcome. I can be normally be reached at the
following:
Telstar Bulletin Board (512) 822-8882
SAHUG Bulletin Board (512) 341-0586
Compuserve ID: 72330,123
If you distribute this program, or a modification of this
program, it would be nice for you to acknowledge the source.
Bruce Dubbs
GDC Software
122 Valencia Dr.
Universal City, TX 78148
September 2, 1986
Page 9 DataPath - GDC Software
Modification History
Version 1.0 - September 2, 1986 - Original release.
Version 1.1 - September 18, 1986 - Add /Q, /V, /W, and /R
switches. Allow DataPath to be searched if
disk drive is specified in ASCIIZ file spe-
cification.
Version 1.2 - October 9, 1986 - Add /H switch. Improve
memory resident check for compatability with
other GDC memory resident utilities.
Version 1.3 - February 3, 1987 - Check for and remove illegal
characters in the DataPath. Illegal characters
are: $"[]*?+=<>
Version 1.5 - February 17, 1987 - Add /C switch. Ignore all
blanks and non-printing characters. Check for
illegal switches.
Version 1.6 - February 24, 1987 - Fix bug that returned wrong
error code for zero length file.
Page 10 DataPath - GDC Software
Suggestions for use
The best way to use DataPath is to organize your disk
subdirectories such that the executable and supporting files
are on a different subdirectory than the data files. The
best example is WordStar. If you put the WordStar executable
and overlays in a subdirectory 'WORDSTAR' and have your data
files in other subdirectories, the following benefits occur:
1. You can execute WordStar from ANY subdirectory.
2. You do not have to look for your data files intermixed
with executable and overlay files.
To do this, set the following to execute in the
AUTOEXEC.BAT file that executes when you boot MS-DOS.
PATH \WORDATAR
DATAPATH \WORDSTAR
WS
This procedure can be generalized to any set of programs
and overlays. To keep from setting multiple paths for all
searches, a set of batch files can be created such as the
following file that executes dBase III.
DO.BAT: echo off
datapath c:\dbase
path c:\dbase
dbase %1
path c:\bin;c:\batch
datapath c:\bin
This example assumes the dBase executable files are in the
directory \dbase, the batch file DO.BAT is in the directory
\batch, the MS-DOS executable files are in \bin and the data
for dBase are in the current directory.
For more information on batch files, consult the MS-DOS
manual.