Dbase II User's Guide for the APC Is a Tutorial Guide and Reference Manual for Use with Dbase II
Total Page:16
File Type:pdf, Size:1020Kb
~~ Advanced Ar--"Personal Computer TM dBase n User's Guide NEe NEe 'nfo,mation Svstems,lne. 819-000100-8001 2-83 Copyright (C) 1983 Ashton-Tate 10150 West Jefferson Boulevard Culver City, CA 90230 The dBASE II User Manual is copyrighted and all rights are reserved by Ashton-Tate. The dBASE II User Manual may not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine readable form without the express permission of Ashton-Tate. Contents Page PREFACE ......................................................... xiii Chapter 1 Introduction to dBASE II USING THIS GUIDE ............................................. 1-1 THE EQUIPMENT ............................................... 1-2 The Keyboard ............................•................... 1-2 The Screen ................................................... 1-2 The Diskette Drives ............................................ 1-3 The Diskettes ................................................. 1-3 The Printer ................................................... 1-3 CONVENTIONS USED IN THIS MANUAL .......................... 1-3 Typographic Conventions ...................................... 1-4 Special Symbols ............................................... 1-4 Terminology .................................................. 1-4 Chapter 2 Getting Started FORMATTING DISKETTES ...................................... 2-1 MAKING A WORKING COPY .................................... 2-4 PUTTING CP/M-86 AND SUBMIT ON THE dBASE II DISKETTE .... 2-7 Using PIP With a Dual-Drive APC ................................ 2-8 Using PIP With a Single-Drive APC ................................ 2-8 PUTTING THE LOADER ON THE dBASE II DISKETTEE ........... 2-10 Chapter 3 A Short Introduction To Using dBase II STARTING UP ......................... ,.......................... 3-1 CREATING A DATABASE DESCRIPTION ........................ 3-3 ENTERING DATA RECORDS ..................................... 3-7 LISTING THE CONTENTS OF A DATA BASE ...................... 3-10 SORTING THE DATA BASE FILE ................................. 3-11 CHANGING THE DATA ......................................... 3-13 VIEWING THE DATA SELECTIVELy ............................. 3-14 REPORTING ..................................................... 3-15 USING THE PRINTER ............................................ 3-17 ENDING A dBASE II SESSION .................................... 3-18 111 Contents (cont' d) Page Chapter 4 Planning a Data Base WHAT IS A DATA BASE? ........................................ 4-1 SOME DEFINITIONS ............................................. 4-2 A SAMPLE DATA BASE .......................................... 4-2 Splitting into Files ............................................. 4-4 Refining the Fields ............................................. 4-4 Saving Space .................................................. 4-5 Changing the File Contents ..................................... 4-6 Chapter 5 Creating A Data Base GETTING STARTED ............................................. 5-1 Setting the Date ............................................... 5-2 Using dBase II Data Diskettes ................................... 5-3 CREATING A DATA BASE ....................................... 5-4 Naming the File ............................................... 5-4 Describing the Record Structure ................................. 5-6 Saving the Description ......................................... 5-10 Using Files ................................................... 5-10 Entering Data Records ......................................... 5-12 VIEWING THE RESULTS ......................................... 5-14 Listing Records ........................................... !... 5-15 Listing DBF File Names ........................................ 5-16 Listing the Structure ........................................... 5-17 FULL-SCREEN EDITING ......................................... 5-18 Moving the Cursor .......... ~ ................................. 5-20 Overtyping ................................................... 5-21 Inserting Characters ........................................... 5-21 Deleting Characters ............................................ 5-21 Exiting the Edit Mode .......................................... 5-22 ERROR CORRECTION DIALOG .................................. 5-24 Chapter 6 Using The Data Base Selectively POSITIONING YOURSELF IN THE DATA BASE ................... 6-1 iv Contents (cont' d) Page GOTO ........................................................... 6-1 Skipping Around .............................................. 6-3 Current Record Pointer ........................................ 6-5 ? Command .................................................. 6-6 Calculator Mode .............................................. 6-7 ?? Command .................................................. 6-7 dBASE II SYNTAX ............................................... 6-8 Command Format ............................................. 6-8 Expanding your Control with Phrases ............................ 6-10 FINDING RECORDS BY THEIR CONTENTS ....................... 6-26 REFINING SOME FAMILIAR COMMANDS ........................ 6-27 Chapter 7 Modifying A Data Base ADDING NEW RECORDS ........................................ 7-1 Append ...................................................... 7-1 Insert ........................................................ 7-4 CLEANING UP DATA BASE ...................................... 7-8 Restoring Records to the Data Base .............................. 7-10 Permanently Removing Records from the Data Base ................ 7-12 SORTING THE FILE ............................................. 7-13 Sorting on Multiple Keys ....................................... 7-14 MODIFYING THE RECORD CONTENTS .......................... '7-16 Interactive Modifications to Records ............................. 7-16 Replacing Fields Quickly ....................................... 7-20 Merging Records from two Data Bases ........................... 7-25 Chapter 8 Working With the Data Base Structure DUPLICATING FILES ............................................ 8-1 Selective Copies ............... .' ............................... 8-2 DELETING AND RENAMING FILES .............................. 8-3 Renaming Files ............................................... 8-5 Maximizing Diskette Space ..................................... 8-6 Backup Procedures for a Dual-Drive APC ........................ 8-7 Backup Procedures for a Single-Drive APC ....................... 8-7 v Contents (cont' d) Page CHANGING THE DATA BASE STRUCTURE ...................... 8-7 Generating the Structure ............ 0 0" 0 ••••.••• 0•••..• 0 ••••••• 8-8 RESTRUCTURING THE SAMPLE DATA BASE ..... 00 •••••• 0•••• ;.8-16 CHANGING FIELD NAMES ...•....... 0 0 • 00 ••.••.• 0•••••• 0•••• 0•• 8-21 Chapter 9 Indexed Files INDEXING FILES ... 0o. 00 •••••••••••• 000.000 •.••.•••••••••••••••• 9-2 INDEXING ON MORE THAN ONE FIELD . 00 •••••.••• 0 •••• 0 ••••••. 9-4 USING INDEXED FILES .............. 0 •• 0 •••••.•• 000 •••••••••••• 9-6 Finding Records in an Indexed File ... 0 ••••••••• ' ••• 0 ••••••••••••• 9-7 U sing the Found Record ............. 0 0• 00 0 •••••• 00 •••••• 0•• 0 ••• 9-9 Finding More 0 ••• 0•• 00 ••••••••••••• 00 • 000 •••••• 0••••••••••• 0•. 9-10 Command Operations with Indexed Files .. 0 •••••.• 000 ••••••• 0.0 •• 9-10 Positioning Commands 0 ••••••••••••• 0 ••••••••••• 0• 0 ••.•• 0•••••• 9-11 Commands that Change File Contents . 0 •••••••.•••• 0 0 ••••• 0•••••• 9-11 Chapter 10 Reporting The Contents of Data Bases SUMMARIZING THE RECORD CONTENTS ........ 0••••••••••••• 10-1 Creating a Report Form File 0 •••••••• 0••• 0•••.••••• 0 ••••• 0••••• 10-1 Using Report Form Files ..... 00 ••••• 0••• 0•••••.. 00 0 ••••••••• 0 • 10-8 PREPARING TABLES WITH REPORT. 000000 ••••••• 000 ••.••••• o. 010-13 QUANTIFYING THE FILE CONTENTS. 0 ••••••••••• 00.0 •.••••• 0 •• 10-13 SUMMARIZING DATA AND ELIMINATING DETAILS 0 •••••• 0•• 0. 10-16 Chapter 11 U sing the Printer PRINTING REPORTS .. 000 •••• 0.00 ••••• 0••• 0•••••••• 00 •••••• 0••• 011-1 INTERACTIVE PRINT CONTROL ....... 000 •••••••.•• 0. 00 ••• 0•• 0 0.11-1 PRINTING COMMAND FILES. 00 0 0.00. 0••• 00 •••••• 000 ••••••••• 0011-2 PRINTING FROM COMMAND FILES .. 000.00 •••••• 0000 ••••••• 0 •• 11-2 Chapter 12 Generating Reusable Variables And Instructions MEMORY VARIABLES .......................................................... 12-1 Creating Memory Variables ................................................. 12-1 Rules for Character String Memory Variables ............................ 12-4 Creating Numeric Memory Variables ...................................... 12-4 Displaying Memory Variables ............................................... 12-4 vi Contents (cont'd) Page Eliminating Memory Variables .............................................. 12-5 Saving Memory Variables .................................................... 12-6 Reading Memory Files ....................................................... 12-7 MACRO SUBSTITUTION FUNCTION ....................................... 12-8 USING MEMORY VARIABLES WITH THE FIND COMMAND ........ 12-9 Chapter 13 Using More Than One Data Base File USING TWO DATA BASES CONCURRENTLy ............................ 13-1 TRANSFERRING INFORMATION BETWEEN AREAS .................. 13-3 COMBINING TO FORM A NEW FILE ............................ 13-6 Chapter 14 Command Files SETTING UP COMMAND FILES ....... '" ...................................