📄 993-996.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Unleashed, Third Edition:Adabas-D and other Databases</TITLE>
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=0672313723//-->
<!--TITLE=Linux Unleashed, Third Edition//-->
<!--AUTHOR=Tim Parker//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Sams//-->
<!--CHAPTER=62//-->
<!--PAGES=993-996//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="990-993.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="996-998.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H3><A NAME="Heading8"></A><FONT COLOR="#000077">dbMan</FONT></H3>
<P>The dbMan program is an interpreter. When you start dbMan, you get a <TT>CMD:</TT> prompt. This is where you enter all your commands to dbMan. You can think of this as a . prompt in dBASE. For starters, you can type in ASSIST, at the CMD: prompt. ASSIST starts up a menu-driven interface similar to the ones available with FoxPro or dBASE.</P>
<P>The menu-driven interface is not very elaborate. <TT>ASSIST</TT> only enables one file to be open at a time, which means that it is not possible to set up relations. It is possible to start up a simple program generator from <TT>ASSIST</TT>. Again, it has a single file limitation.</P>
<P>You can compile programs in dbMan. Compiling a program does not produce an executable binary. It produces a <TT>.run</TT> file, which still requires dbMan to execute it. It is also possible to enter <TT>CREATE REPORT</TT> or <TT>MODIFY REPORT</TT> at the <TT>CMD:</TT> prompt. This puts you in dbMan’s report writer. The report writer enables display of data by using the relational operators. dbMan provides a function called <TT>PMENU()</TT> to create pull-down menus. <TT>PMENU</TT> doesn’t have any mechanism for temporarily disabling a menu choice.</P>
<P>dbMan handles windows differently from other xBase products. Prior to defining a window, you call <TT>PUSHWIND()</TT> to push the current window onto a stack. When a program is in its initial state, the entire screen is considered to be a window. You then call <TT>WINDOW()</TT> to create the window. When you are finished with it, you call <TT>POPWIND()</TT>, which removes the window and makes the previous window active.</P>
<P>dbMan enables you to define only one hot key. You do so by invoking the <TT>ONKEY()</TT> function. This has no effect until you execute the <TT>ONKEY</TT> statement. The statement will normally be <TT>DO</TT> hot-key-handler.</P>
<P>The <TT>BROWSE</TT> command has a long list of options. You can browse only specified fields, and you can specify the width of each field, and whether it is editable. The list of fields can include fields in other files, which is great if you have relationships set up.</P>
<P>dbMan does not use either <TT>termcap</TT> or <TT>terminfo</TT>. Instead, it includes a file named <TT>dbmterm.dbm</TT>. This file looks similar to <TT>termcap</TT>. There are no entries for either xterm or console. You have to create your own entries using the existing entries.</P>
<P>dbMan has no facility for executing functions written in C or assembler, so you have to use what they offer. There were a couple of nasty bugs in the version of dbMan I evaluated, which was version 5.32. The main bug I found was that procedure files simply didn’t work if the procedure file was a <TT>.prg</TT>. If you compiled the procedure file into a <TT>.run</TT> file, it worked okay.</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>Note: </B><BR>You can get dbMan from<DL>
<DD>VERASOFT Corporation
<DD>4340 Alamaden Expressway, #110
<DD>San Jose, CA 95118
<DD>(408) 723-9044
</DL>
<HR></FONT>
</BLOCKQUOTE>
<H3><A NAME="Heading9"></A><FONT COLOR="#000077">Adabas-D</FONT></H3>
<P>Adabas-D is a full-featured database that offers the power of commercial database products for UNIX that sell for thousands of dollars. Supporting SQL and links to many popular database formats, Adabas-D is worth considering if you need more power than the xBase products just mentioned.
</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>Tip: </B><BR>There are several vendors and suppliers of Adabas-D. One of the more reliable is Caldera, which offers several Linux application products, as well as their own version of Slackware Linux under the name Caldera OpenLinux. Caldera can be reached at:<DL>
<DD>Caldera Incorporated
<DD>633 South 550 East
<DD>Provo, Utah 86406
<DD>801-377-7687
<DD><A HREF="knfo@caldera.com">knfo@caldera.com</A>
<DD><A HREF="http://www.caldera.com">http://www.caldera.com</A>
</DL>
<HR></FONT>
</BLOCKQUOTE>
<H4 ALIGN="LEFT"><A NAME="Heading10"></A><FONT COLOR="#000077">Installing Adabas-D</FONT></H4>
<P>Adabas-D is usually supplied on CD-ROM, although a few FTP sites make it available, too. Installation is quite simple. Although Caldera’s version is labeled as suitable for use with their own OpenLinux, Adabas-D works on virtually all Linux implementations. Installation is simple. The following procedure works on all versions of Red Hat, Slackware, and OpenLinux we tested. We’ll assume the Adabas-D software is on CD-ROM. If you have a downloaded file, it should be placed in an accessible directory and the mounting steps mentioned below skipped.
</P>
<P>Log in as <TT>root</TT>. The installation procedure should be conducted as the root login. Mounting the CD-ROM is the first step. This is particularly easy with the command:</P>
<!-- CODE SNIP //-->
<PRE>
mount /mnt/cdrom
</PRE>
<!-- END CODE SNIP //-->
<P>This version of the <TT>mount</TT> command skips one of the arguments you may have seen in earlier chapters where the <TT>mount</TT> command has both a device name and a mount point. Since both are provided with this mount command, the system loads the CD-ROM device onto the filesystem mount point <TT>/mnt/cdrom</TT>. You can use any other mount point, of course, if you want. We’ll assume the default throughout this section.</P>
<P>After mounting the CD-ROM, change into the Adabas-D mounted directory with the command:</P>
<!-- CODE SNIP //-->
<PRE>
cd /mnt/cdrom
</PRE>
<!-- END CODE SNIP //-->
<P>A directory listing at this point will show the contents of the Adabas-D. Most of the files are in subdirectories.
</P>
<P>To make life easier for us, this version of the Adabas-D CD-ROM distribution has an installation script that takes care of the steps usually conducted manually. To execute this script, simply type the command:</P>
<!-- CODE SNIP //-->
<PRE>
./install
</PRE>
<!-- END CODE SNIP //-->
<P>The preceding period and slash indicate to the shell that the install script is in the current directory. If you leave these off, Linux looks for an install program elsewhere on the filesystem before looking in the current directory. This usually results in another install routine being executed. If your version of Adabas-D does not have an installation script, there may be a list of steps you must perform manually in another file. Check the directory for instructions.
</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="990-993.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="996-998.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -