@echo off : file: dossetdb.bat G. Moody 11 September 1989 : Last revised: 7 May 1997 : This script sets environment variables used by DB applications. : Note: the MS-DOS/MS-Windows installation program, software\install.exe, : creates a customized version of this batch file for your system. In most : cases you should use the version created by install.exe rather than this : one, which is included here for reference only. : If you are already near the limit of your available environment space, you : may not be able to set these variables successfully. You may get an error : while executing this script, or you may find that environment variables : needed for other applications cannot be set. In this case, you will need to : expand your environment. This can best be done by adding a command such as: : shell=c:\command.com /p /e:512 : in your config.sys file. The number that follows the /e: is the size of : the environment in bytes. See your MS-DOS manual for further information. : If you use the DB Software Package regularly, you will find it easiest to : invoke this batch file -- most likely the version of it created by install -- : from your autoexec.bat, so that the DB environment is set automatically : whenever you reboot your PC. In modern versions of MS-DOS, and under any : version of MS-Windows, do this by adding : call c:\bin\dossetdb : to your autoexec.bat. Do not omit the _call_ from this command, or any : commands that follow dossetdb in your autoexec.bat will not be executed. : Replace c:\bin\ above by the correct path to this file if you install it : somewhere else. : The DB path, by analogy to the MS-DOS PATH variable, is a list of directories : in which DB applications search for their input files. You may define it : directly, as the value of the DB environment variable, or indirectly, within : a file named by the DB environment variable. : Here is a simple example of a direct definition of the DB path: :set DB=;c:\database : This statement defines the DB path as consisting of the current directory -- : this is represented by the empty string before the semicolon -- followed by : the \database directory on the c: drive. It is strongly recommended that you : retain the initial null component, since any DB files that you create, such : as annotation files, normally are written in the current directory and will : be accessible for reading only if there is a null component in the DB path. : You may wish to create c:\database for long-term storage of database records : that you create. If you wish, add more directories to the list. : Here is an example of an indirect definition of the DB path: :set DB=@c:\database\dbpath.dos@ : This statement indicates that the DB path is specified by the contents of the : file named between the @ characters -- c:\database\dbpath.dos. This file : should contain a list of all of the directories to be searched, separated by : semicolons, in the same format as in the first example above. All of the : directories should be listed on a single line, which may be arbitrarily long. : An indirect definition is useful for reducing the amount of environment space : needed for the DB variable, and is necessary if the list of directories is : so long that a direct definition would exceed the 127-character maximum : length of an MS-DOS command. : Within the DB path, any string of the form %Nr, where N is a digit between : 1 and 8, is replaced by up to the first N characters of the current record : name when a DB application searches for its input files. The string %r is : replaced by the entire record name. Use this feature to set DB path : components for the MIMIC Database, in which files associated with each record : are kept in a directory named by the first 3 digits of the record name. For : example: :set DB=;c:\database;d:\mimicdb;d:\mimicdb\%%3r : In this example, the MIMIC Database records are assumed to be located on a : CD-ROM in the d: drive. Both the main MIMIC Database directory -- mimicdb -- : and the per-record subdirectories, represented by d:\mimicdb\%%3r above, are : included in the DB path. If you use a batch file such as this one to set the : DB path directly, note that the % character must be doubled in order to : prevent COMMAND.COM from attempting to perform its own variable substitution. : COMMAND.COM does not interpret % characters typed at its prompt, however, so : you should not double the % characters if you set DB without using a batch : file. If you set the DB path indirectly, again only a single % is necessary, : since COMMAND.COM is not involved at all in this case. : The DBCAL environment variable names a file that must be found somewhere in : the DB path. The file specifies the relative sizes of different types of : signals, and is needed by applications such as view and wview so that signals : of different types can be scaled appropriately for display. set DBCAL=dbcal