ECG Database Applications Guide Table of Contents


setdb, cshsetdb, dossetdb - set DB environment variables


. setdb
source cshsetdb


sh, bash, and ksh shell users:

setdb sets the shell variables DB and DBCAL to the appropriate values to permit access to on-line ECG databases. It must be executed using the ``.'' as shown above. A frequent user of the databases will find it convenient to include an invocation of setdb in the .profile file.

csh and tcsh users:

cshsetdb sets DB and DBCAL similarly for the C-shell. It must be executed using ``source'' as shown above. It may be convenient to include this command in the .cshrc file.

MS-DOS users:

dossetdb sets DB and DBCAL similarly for MS-DOS; it also sets VIEWP (see view(1) ). It may be convenient to include this command in the autoexec.bat file (under MS-DOS 3.3 and later, include the command ``call dossetdb'' within autoexec.bat; under earlier versions of MS-DOS, use ``command /c dossetdb'', or append the contents of dossetdb.bat to autoexec.bat).

These programs are shell scripts that must be customized before using them for the first time on a new machine.


The database path: a list of directories that contain database files. An empty component is taken to refer to the current directory. All applications built with the db(3) library search for their database input files in the order specified by DB. If DB is not set, searches are limited to the current directory. Under UNIX, directory names are separated by colons (:), and the format of DB is that of the Bourne shell's PATH variable (see sh(1) ). Under MS-DOS, directory names are separated by semicolons (;), and the format of DB is that of the MS-DOS PATH variable (colons may be used following drive specifiers within DB in this case). The Macintosh does not support environment variables as such; on the Macintosh, the value of DB is defined in dblib.h (one of the DB library source files, not usually included in DB applications), and it contains a semicolon-delimited list of directories (folders) as under MS-DOS, but with colons used as directory separators rather than backslashes as under MS-DOS. Under any environment, if the value of DB begins with `@', the remainder of the string is taken as the name of an ``indirect DB path file'' that defines the database path in the format described above. This feature was introduced in DB library version 8.0, mainly to permit Macintosh users to modify the DB path without recompiling the DB library, but it is also useful under MS-DOS to avoid the 128-character limit on the length of environment variables. Indirect DB path files can be nested up to 10 levels deep.
The name of the DB calibration file (see dbcal(5) ). The usual rules for finding DB files by searching the DB path apply to the DB calibration file, so the value of DBCAL need not be an absolute path name. The DB calibration file is used by DB applications that need to plot signals at standard scales, as well as by calibrate(1) , which can determine the baseline and gain of signals if calibration pulses are present and if the parameters of the calibration pulses are described in the calibration file. If DBCAL is not set by the user, the DB library uses a default DB calibration file (dbcal, named in dblib.h). If the DB calibration file is not readable, programs that rely on it may not choose appropriate scales for some types of signals.

Table of Contents