This new version is completely compatible with the databases created by previous versions. Subject: Database Application for HP48G/GX (DBASE), Version 2.0 BYTES: # 9DE2h 6092 VERSION HISTORY: 1.1 Sped up the full-screen display of individual records. The medium-fonts for the HP48G Series are not hidden, as in previous series, allowing for very fast text display. 2.0 Wrote new title browser into library ( previously used internal browser that EQNLIB uses ). Defined null-named local variables instead of explicitly named variables. Better management of the return stack for cleaner exit. Fully supported calling from within the command line and, upon exit, returning to the original command line. Allowed cancellation of record adding and editing from input prompt. Marked stack prior to input prompts for data input so that the interactive stack would be more usable and reliable. Wrote machine code search routines. Allowed searches of all databases. Replaced ABOUT command. The following are prominent features of this database application for an HP48G/GX: * Written in System RPL and Machine Language. * Allows multiple databases with variable numbers of fields. * Allows browsing records and databases using a high-speed browser. * Records exceeding the display boundaries can be scrolled. * Linefeeds in strings split text into separate display rows. * Repeat key features. * Sorts records and databases. * Databases accessible from any directory. * Fully supports calling from within the command line and, upon exit, returning to the original command line. OVERVIEW Each database consists of a number of records. Each record contains a number of fields. The physical structure of each database is a list of list(s) of string(s). The databases are stored in the hidden directory ( #640BEh SYSEVAL to enter -- caution: careless use of SYSEVAL can cause a memory reset ). As depicted, there are three basic environments. The arrows indicate access between the different environments. Record Viewer<----->Record Browser<----->Database Browser Record Viewer: -Displays one record at a time. Each field is displayed starting on a new row. If a field contains linefeed characters, then the next character after the linefeed is displayed on a new row. If the record displayed extends beyond the display boundaries, then the display can be scrolled to view the entire record. Records can be searched, pushed to the stack, copied, added, deleted, and edited. Record Browser: -Browses records. The records can be browsed by any field. Records can be searched, added, deleted, and edited. Database Browser: -Browses database names. Databases can be added, deleted, searched, and renamed. INSTALLATION: To install the DBASE library, follow the instructions for an auto- attaching library in chapter 28 of the HP 48G Series User's Guide. As always, backup memory before using. DBASE can be called from within the command line if in a user menu or assigned to a user key in the RPL form :: TakeOver DBASE ;. dbg2inst.ref Use dbg2inst.ref ( at the end of this text ) to install eight sample databases including: Airlines, Hotels, and Rental_Cars which contain various 800 numbers. dbg2inst.ref can be used when other databases have already been created by this version of DBASE or previous versions. DEFINING A DATABASE: If no database exists or the user chooses to add a new database, then the user will be prompted to define a new database name ( such as Phone_Personal, To_Do... ) and then specify the number of fields in each record. The user is then prompted to name the fields of each record ( such as Name, Phone, Misc,...). The field names are stored as the first record of each database. This first record describing the fields cannot be purged or sorted but can be renamed. A database name can be any sequence of characters. Thus, permissible database names can start with a number or contain spaces. Database names cannot be null, but fields can, though. SEARCHING RECORDS AND DATABASES NAMES There are two types of search routines available in any environment: Alpha Search: Allows search by first character. Press "alpha" key and then enter character, which can include lower-case and special characters. Search starts at first data entry. In record browser or viewer, searches for record starting with specified character. In database browser, searches for database name starting with specified character. String Search: Allows search by string input of one to fifteen characters. Press "FIND->" and enter search string. An entry of upper-case characters will match both upper and lower-case characters. In record browser or viewer, searches current database beyond current record. In database browser, searches records in one or more databases starting at highlighted database. If a match is found, record browser is started highlighting matching record. EDITING AND ADDING RECORDS If the command line contains any characters, pressing the "ON" key, erases the command line. If the command line contains no characters, then pressing the "ON" key cancels the edit or add procedure. If just a character string from the stack into placed into an empty command line, the leading quotation mark and trailing quotation mark and space will automatically be stripped when entered. RECORD BROWSER ENVIRONMENT When the browser is active to view the records in a database, the keyboard is defined as follows: 11.1 DB Starts database browser highlighting the current database. 12.1 FIND-> See SEARCHING RECORDS AND DATABASES NAMES. 13.1 FLD-> Browses records by the next or first field. 14.1 ADD Adds record. 15.1 DEL Deletes record. 16.1 EDIT Edits record. 24.1 VAR Displays previous or first page of records. 25.1 UPARROW Highlights previous or first record. 25.3 Highlights first record. (right-shifted UPARROW) 26.1 NXT Displays next or last page of records. 35.1 DOWNARROW Highlights next or last record. 35.3 Highlights last record. (right-shifted DOWNARROW) 51.1 ENTER Views highlighted record in record-viewer mode. 61.1 ALPHA See SEARCHING RECORDS AND DATABASES NAMES. 91.1 CANCEL Exits. 93.1 Turns calculator off. RECORD VIEWER ENVIRONMENT When a record is being viewed in the full-screen mode, the keyboard is defined as follows: 11.1 FIND-> See SEARCHING RECORDS AND DATABASES NAMES. 12.1 STK-> Places fields of record onto stack. 13.1 COPY Creates duplicate of record. 14.1 ADD Adds record. 15.1 DEL Deletes record. 16.1 EDIT Edits record. 25.1 UPARROW Advances to previous record. 25.3 Advances to top record. (right-shifted UPARROW) 35.1 DOWNARROW Advances to next record. 35.3 Advances to last record. (right-shifted DOWNARROW) 51.1 ENTER Starts Record Browser mode highlighting the current record. 61.1 ALPHA See SEARCHING RECORDS AND DATABASES NAMES. 91.1 CANCEL Exits. 93.1 Turns calculator off. If the current record exceeds the display boundaries, 24.1 VAR Scrolls display up 24.3 Jumps to top of display 26.1 NXT Scrolls display down 26.3 Jumps to bottom of display 34.1 LEFTARROW Scrolls display left 34.3 Jumps to left edge of display 36.1 RIGHTARROW Scrolls display right. 36.3 Jumps to right edge of display DATABASE BROWSER ENVIRONMENT When the browser is active to view the database names, the keyboard is defined as follows: 11.1 ADD Adds database. 12.1 DEL Deletes database. 13.1 FIND-> See SEARCHING RECORDS AND DATABASES NAMES. 14.1 REN Renames Database. 15.1 USE Starts record browser using highlighted database. 24.1 VAR Displays previous or first page of databases. 25.1 UPARROW Highlights previous or first database. 25.3 Highlights first database. (right-shifted UPARROW) 26.1 NXT Displays next or last page of databases. 35.1 DOWNARROW Highlights next or last database. 35.3 Highlights last database. (right-shifted DOWNARROW) 51.1 ENTER Starts record browser using highlighted database. 61.1 ALPHA See SEARCHING RECORDS AND DATABASES NAMES. 91.1 CANCEL Exits. 91.3 Turns calculator off. CREDITS * Thanks to Rick Grevelle for MDISPN. * Thanks to Mika Heiskanen for Sorted Entries Document. * Thanks to Joe Horn for Goodies Disks. * Thanks to Detlef Mueller & Raymond Hellstern for RPL48 Toolkit. * Thanks to Scotty Thompson for SEDITR. * Thanks to Jan Brittenson for MLDL and STAR. Todd Eckrich ( mte@delphi.com ) 1428 Oaklanding Road Mount Pleasant, SC 29464 803 881-8781