i The Client Database Program C-BASE for IBM PC User's Manual ii C-BASE for IBM PC is a database program written by Custom Computing Solutions. Many thanks to Borland International for their Turbo Pascal and Turbo Pascal Database Toolbox. Copyright (c) 1990 Custom Computing Solutions All rights reserved. Printed in Canada. Custom Computing Solutions 1122 Millwood Court Orleans, Ontario Canada K1C 3G1 Telephone: (613) 830-3846 TABLE OF CONTENTS iii INTRODUCTION TO C-BASE . . . . . . . . . . . . . . . . . . . . . 1 Features of C-BASE. . . . . . . . . . . . . . . . . . . . 1 GETTING STARTED. . . . . . . . . . . . . . . . . . . . . . . . . 3 Installing C-BASE . . . . . . . . . . . . . . . . . . . . 3 To Start C-BASE . . . . . . . . . . . . . . . . . . . . . 3 Start a new database. . . . . . . . . . . . . . . . . . . 3 Start with an existing database . . . . . . . . . . . . . 4 ADDING RECORDS . . . . . . . . . . . . . . . . . . . . . . . . . 5 Add Records . . . . . . . . . . . . . . . . . . . . . . . 5 Store Record. . . . . . . . . . . . . . . . . . . . . . . 6 LISTING RECORDS. . . . . . . . . . . . . . . . . . . . . . . . . 7 Change List: Sort field to Name, RefNo or Date . . . . . . . . . . . . 7 Output format to Line, Label(1 or 2) or DefFmt. . . . . . 9 Output device to Screen, Printer or File. . . . . . . . . 9 RESTARTING C-BASE. . . . . . . . . . . . . . . . . . . . . . . . 11 SCANNING THE DATABASE. . . . . . . . . . . . . . . . . . . . . . 12 Find Scan Record(s) . . . . . . . . . . . . . . . . . . .12 Scan Database Records . . . . . . . . . . . . . . . . . .14 ACCESSING THE UTILITY MENU . . . . . . . . . . . . . . . . . . . 16 Access Utilities. . . . . . . . . . . . . . . . . . . . .16 Add Another Database to Current . . . . . . . . . . . . .16 Backup and Compress Current Database. . . . . . . . . . .17 CUSTOMIZING C-BASE . . . . . . . . . . . . . . . . . . . . . . . 18 1 - Change Screen Colors. . . . . . . . . . . . . . . . .18 2 - Change Default Program Parameters . . . . . . . . . .19 3 - Define a List Format. . . . . . . . . . . . . . . . .20 DELETING AND RENAMING DATABASES. . . . . . . . . . . . . . . . . 21 Delete a Database . . . . . . . . . . . . . . . . . . . .21 Rename a Database . . . . . . . . . . . . . . . . . . . .21 REBUILDING INDEX FILES . . . . . . . . . . . . . . . . . . . . . 22 SPECIAL SEARCHING. . . . . . . . . . . . . . . . . . . . . . . . 23 UNDELETING AND DUPLICATING RECORDS. .. . . . . . . . . . . . . . 24 EXECUTING DOS. . . . . . . . . . . . . . . . . . . . . . . . . . 25 APPENDIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Menu Function Keys. . . . . . . . . . . . . . . . . . . .26 Field Editing Keys. . . . . . . . . . . . . . . . . . . .26 Keys which work anywhere in C-BASE. . . . . . . . . . . .27 Client Record Format. . . . . . . . . . . . . . . . . . .28 C-BASE Files. . . . . . . . . . . . . . . . . . . . . . .28 Database File Extensions. . . . . . . . . . . . . . . . .29 TROUBLE SHOOTING GUIDE. . . . . . . . . . . . . . . . . .30 Restoring a backed up database to Your Hard Disk . . . . .. . . . . . . . . . . . . . . 31 GLOSSARY . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 I N T R O D U C T I O N T O C - B A S E 1 C-BASE (Client database) is a database program for keeping records containing names, addresses, phone numbers and remarks on up to 65,535 clients. C-BASE uses record index files and is 100% machine code instructions for turbo speed. It can also be used to print invoices or mailing labels for these clients as well as writing customized output to a DOS file to use as input to other software packages. C-BASE is menu- driven and easy to use with brief instructions at the bottom of the screen to help you out. C-BASE is designed to be used on an IBM PC or clone running MS-DOS. A hard disk drive is not necessary but highly recommended. FEATURES OF C-BASE - Integrates with other software packages - Stores up to 65,535 client records - Sorts by Customer name, Reference number or Entered date - Searches for records by Customer name or Reference number - Uses index files for ultra-fast record retrieval - Creates customizable reports - Uses any number of C-BASE databases - Re-builds file indexes automatically or manually - Includes all database functions: Add, View, Modify, Delete or Print records - Provides ten (10) user defined list formats - Lists output to Screen, Printer or DOS file - Transfers records from one C-BASE database to another - Renames or deletes any C-BASE database on disk - Backs up and compresses C-BASE databases - Customizes screen colors and miscellaneous program parameters to your specifications - Displays your company name and the date and time at the top of every screen 2 - Provides easy-to-use, menu driven screens with brief instructions at the bottom line of the screen - Lists records in any desired range - Shells to DOS - Restores (undeletes) deleted records and duplicates existing records - Searches for records from any character in any fields G E T T I N G S T A R T E D 3 INSTALLING C-BASE C-BASE may be installed in any existing directory. INSTALLATION INSTRUCTIONS 1. Start DOS on your computer. 2. Insert the C-BASE disk into Drive A. 3. Type cd \cbasedir (where cbasedir is the name of the directory where C-BASE is to be installed). 4. Type a:install and press ENTER. *If you wish to create a directory for C-BASE, see the MKDIR or MD (Make directory) command in your DOS manual. 4. Type a:install and press ENTER. 5. Respond to the prompts as directed and press ENTER to install C-BASE in the current directory. *If your computer has only one floppy and no hard disk drive then installation is not necessary. However, colors will have to be defined if you have a color monitor (see Change Screen Colors under Customizing C-BASE section). TO START C-BASE 1. If you have just completed the Install procedure above, your working directory should now be the C-BASE directory; if not, type cd \cbasedir (where cbasedir is the name of the directory in which you have chosen to install C-BASE) and press ENTER. 2. Type cbase and press ENTER. The Opening Screen will be displayed. Start a New Database 3. Move the DOWNARROW KEY to "Start a new database", then press ENTER or type S. The Start a New Database Screen will be displayed. 4. Select the default database CLIENTS or enter any database name (maximum 8 characters), then press ENTER. This will create your database file. OR 4 Start with an Existing Database 3. Select "Use existing database", then press ENTER or type U. The Start with an Existing Database Screen will be displayed with a menu of all existing C-BASE databases (all files with extension ".DAT"). *If you have more than 19 C-BASE databases, you can use the PGUP and PGDN keys to scroll up or down. *If no C-BASE database files exist, C-BASE will flash an error message and display the Start a New Database Screen. 4. Use the UPARROW and DOWNARROW keys to highlight the desired database and press ENTER. The Main Menu Screen will be displayed. 5. At this point, you may wish to customize C-BASE to your specifications (see Customizing C-BASE section). A D D I N G R E C O R D S 5 ADD RECORDS 1. From the Main Menu Screen, select 1 or A: "Add one or more records to database". This selection will display the Record Input Screen. 2. Enter information following the prompts. Press ENTER at the end of each field entry (see Appendix for Field Editing Key explanation). *Please note that Customer name and Reference no. are required entries. All other fields are optional. Customer name: Entries may be up to 56 characters which may be any combination of letters, numbers, or symbols. Reference no.: The initial default is the greatest RefNo in the database + 1. Entries must be entirely numeric and must range between 1 and 65,535. Successive inputs will automatically increment this value by one. *This field can also be referred to by RefNo or Reference number. Business Phone Fax and Home: Entries must be entirely numeric. An optional 5 digit extension space is provided for business phone numbers. Dashes are automatically inserted. Additional phone numbers may be added under Remarks (see below). Address lines 1-3: Entries may be up to 56 characters per line. Contact: Entries may be up to 56 characters. Remarks: Entries may be up to three lines of a maximum 56 characters per line. STORE RECORD 6 3. Pressing ENTER after entering each field will automatically store the record in the database. However, you may store the record at anytime by pressing the F1 key. For example, if you wish to enter only the Customer name, Reference number and Business phone number - press the F1 key and the record will be stored in the database. *After the record is stored, the screen will be ready for you to enter the next record. *The new default RefNo is the last RefNo stored in the database. 4. Press ESC at anytime to exit to the Main Menu Screen. *The Tot at the top right-hand side of the screen indicates the number of records stored in the database including deleted records. *The Recs Used at the top right-hand side of the screen indicates the number of records currently stored (excluding deleted records) in the database. *The Record Number at the bottom of the screen indicates the physical position in the database where the current record input will be stored. L I S T I N G R E C O R D S 7 TO LIST RECORDS BY NAME, REFNO, OR ENTRY DATE 1. From the Main Menu Screen, select 2 or L : "List records by Name, RefNo or EntryDate". This selection will display the List Records Screen. 2. Select the corresponding number of the parameter you wish to change ( 0 - 2 ): SELECTIONS 0 - Sort field: Records may be sorted by: 1) Name (Customer name) 2) RefNo (Reference number) 3) Date (Entry date) *Press the SPACE BAR to display the next option or enter the first letter of the field. Press ENTER to change the range displayed or ESC to return to the List prompt. 1) Name: a) If you wish to list all the records in the database sorted alphabetically by Customer name, press the F1 key to accept the default range: All. b) If you wish to list a sub-range of the records in the database sorted alphabetically by Customer name, enter the Min Name (up to 5 characters) and the Max Name (up to 5 characters). Press ENTER or the F1 key. For example, entering the range A to C will list all records with Customer name starting with the letters A to C inclusive. *If Min and Max Name fields are both blank, all records will be listed. 2) RefNo: a) If you wish to list all the records in the database sorted numerically by Reference number, press the F1 key to accept the database range 1 to 65,535 (all records). 8 b) If you wish to list a sub-range of the records in the database sorted numerically by Reference number, enter the Min Reference number and the Max Reference number. For example, entering the range 100 to 150 will display all records sorted numerically by Reference number within this range. *If you try to enter a Reference number less than 1 or greater than 65,535 a "Reference number out of range" error message will result. 3) Date: a) If you wish to list all the records in the database entered on the current day sorted chronologically, press the F1 key to accept the default range of current date. b) If you wish to list a sub-range of records in the database sorted chronologically, enter the first or Min Entry date and the last or the Max Entry date. For example, entering the range 1990/08/29 to 1990/09/10 will inclusively list in chronological order all records which have been entered between these dates. 9 1 - Output format: The records may be listed in any one of four formats: 1) Line 2) Label1 3) Label2 4) DefFmt *Press the SPACE BAR to display the next format or enter L for Label1, 2 for Label2, or D for DefFmt and press ENTER to select the format. 1) Line: Each record will be displayed on one line containing Customer name, Reference number, Entry date and Record number. 2) Label1: Customer name, Address, and Contact (if required) will be displayed in a 1-inch label format. 3) Label2: Customer name, Address, and Contact (if required) will be displayed in a 1.5-inch label format. 4) DefFmt: (Defined Format) This is a format that you define. You can define or change the row and column where any record fields or text can be displayed in the screen, in a file or on your printer and save these values to a format file. This is described under Selection 3 of the Utility Menu Screen: "Change default parameters" (see section on Defining List Format). 2 - Output device: There are three possible options under this selection: 1) Screen 2) Printer 3) File *Press SPACE BAR to display the next option or enter the first letter of the desired output device and press ENTER to select it. 1) Screen: The screen will display up to 23 lines of output at one time. After 23 lines, the message: "-- More -- Press any key to continue, ESC to exit ..." will be displayed. If you wish to continue listing, press any key. If you do not, press ESC and C-BASE will return to the List Records Screen. *At the end of the list, the screen will display "Press any key to continue ...". Press any key and the program will return to the List Records Screen. 10 2) Printer: Please ensure that your printer is connected, switched on, and on-line or an error message will flash on the screen (your printer must be connected to port 1). 3) File: This option will send your output to a DOS file. The initial list file is "DEFAULT.LST" which can be changed when selecting this option or permanently (see Change Default Program Parameters section). You may enter any filename of up to 8 characters with an optional 3 character extension. 3. When the cursor is at the List prompt, press ENTER to begin list. *If File is selected and the requested file already exists, a message asking if you wish to overwrite, append to the file and create a new file with the listing (overwrite). Selecting A will append the listing to the file and ESC will cancel and return to the list prompt. *If you selected Printer for Output device, a message to confirm that the printer is on-line and ready will be displayed. Press ENTER to start or any other key to cancel print. R E S T A R T I N G C - B A S E 11 1. From the Main Menu Screen, select 3 or R : "Restart program". 2. C-BASE will restart from the Opening Screen without re-initializing any of the variables (this enables you to run C-BASE with another database without having to exit the program). S C A N N I N G T H E D A T A B A S E 12 FIND SCAN RECORD(S) 1. From the Main Menu Screen, select 4 or S : "Scan database to View, Modify, Delete or Print records". This selection will display the Set Scan Sort Field screen. 2. The records to be scanned may be sorted by Customer name, Reference number, or Entry date. Type N (Name), R (RefNo) or E (EntryDate) to make your selection. OR Press ENTER to select the default (the default appears at the top left- hand corner of the screen just below your company name). *Your selection will appear at the top left-hand corner of the screen and will become the new default. Sort by Name: 3. Press CTRL-HOME or CTRL-END keys to find the first or last record sorted alphabetically by Customer name (hold the CTRL key down while pressing the HOME or END key). OR Type the first one or more characters in the Customer name. *C-BASE does not distinguish between uppercase and lowercase characters for name searching. Example: You type M following the Customer name prompt. C-BASE will find the first record in which the Customer name starts with M. If no records with Customer name field starting with M exist, the screen will flash the error message "Record does not exist" and display the record alphabetically next in order. If there is no record next in order found, C-BASE will return to the Customer name prompt where you can enter another name to search for or press ESC to exit to the Set Scan Sort Field screen. OR 13 Press the SPACE BAR to clear the default Customer Name then press ENTER and you can enter the RefNo. Use this option if you know the RefNo, but not the Customer name, or you have several records with the same Customer Name. C-BASE will find the Customer name from the RefNo and display the record. The program will continue sorting by Customer name. Sort by RefNo: 3. Press CTRL-HOME or CTRL-END keys to find the first or last record sorted numerically by Reference number (hold the CTRL key down while pressing the HOME or END key). OR Type the Reference number. If no record with this RefNo exists in the database, the screen will flash a "Record does not exist" error message and display the first record with RefNo greater than the entered number. If no record with RefNo greater than the entered number exists, C-BASE will return to the RefNo prompt where you can enter another RefNo or press ESC to return to the Set Scan Sort Field screen. OR Press the UPARROW key to enter the Customer name (this is in the event that you know the Customer name, but not the Reference number). *C-BASE will find the Reference number from the Customer name field and display the record. The program will continue sorting by Reference number. *The Reference number must be between 1 and 65,535 or an error message will flash. Sort by EntryDate: 3. C-BASE locates records sorted by Entry date from the Customer name or Reference number field. Therefore, the screen will prompt for the Customer name. This is exactly like selecting a sort by Name record above except that the records will be sorted in Entry date order instead of Customer name order. To find the first or last record entered into the database, enter any Customer name or Reference number then press the HOME or END key. SCAN DATABASE RECORDS 14 1. The Scan Records Screen will display the first record requested. The following options are available from this screen: (A)dd (Type A to add the displayed record); (M)odify (Type M to modify the displayed record); (D)elete (Type D to delete the displayed record); (N)ew (Type N to display a new record); (P)rint (Type P to print the displayed record); (L)ist (Type L to display the List Records Screen); (U)til (Type U to display the Utility Menu); PGUP (Type the PGUP key to display the next record in the field); HOME (Type the HOME key to display the first record in the field); END (Type the END key to display the last record in the field). Add or Modify the record Move the cursor to the field that you wish to modify. Type in the modification using FIELD EDITING keys as necessary (see Appendix for Field Editing Key explanation). Press the F1 key when the modification is completed. If you choose to modify the record, it will be stored in the database (only the RefNo need be changed). Or press ESC to cancel the modification and the record will remain unchanged. *If you modify the record and change the RefNo to one that already exists in the database, a "Duplicate Reference number" error will result and the original RefNo will be re-displayed (the entered RefNo will remain in an Add). Delete the record Type Y after the prompt "Confirm delete(Y/N)?". Record will then be deleted and the next record will be displayed. Or type N and the record will not be deleted. Display a new record This option will allow you to entr a new Customer name or Reference number to search for (see Find Scan Record(s), above). 15 Print the record The record will be printed according to the Output format value in the List Records Screen (Line, Label1, Label2, or DefFmt, see section on Listing Records) and listed on the output device is File, C-BASE will send the output to the file name specified. If the file already exists, a message asking if you wish to overwrite, append to the file or cancel will be displayed at the bottom of the screen. Display the List Records Screen This option allows you to display the List Records Screen so that you can list records, change the Sort field, change the Output format or change the Output device or file name to list to. When you press ESC to exit, C-BASE will return to the current record displayed in the Scan Records Screen. Display the Utility Menu This option allows you to run any utility listed in the Utility Menu (described in the following section). After exiting the Utility Menu, C- BASE will return to the current record displayed in the Scan Records Screen. *Press HOME (or CTRL-HOME) or END (or CTRL-END) to display the first or last record in the current Sort field. Press ESC to return to the Main Menu Screen. A C C E S S I N G T H E U T I L I T Y M E N U 16 ACCESS UTILITIES 1. From the Main Menu Screen, select 5 or U : "Utility Menu". ADD ANOTHER DATABASE TO CURRENT 1. From the Utility Menu Screen, select 1 or A : "Add another database to current database". 2. This selection allows you to add one or all records from another database to the current database. A menu of all C-BASE databases will appear on the screen. Select the database you wish to add to the current database by using the UPARROW and DOWNARROW keys and press ENTER. *If you have more than 19 databases you may want to scroll up or down a screen by using the PGUP or PGDN keys. *Selecting the current database (displayed at the top of the screen) will result in an error. 3. After selecting a valid database, C-BASE will request that you enter the record number you wish to add or press ENTER to add the entire database. If any records have the same Reference number as those in the current database, a "Duplicate Reference number" error message will flash and the record will not be added. However, the record with the duplicate Reference number will be displayed on the screen. OR Select a Record number from the add database to add to the current database. The record will be displayed in insert mode. Press F1 to add the record to the database as is, or modify the record (perhaps to change the RefNo to avoid duplicates) and then press F1. Or press ESC and C-BASE will return to the Enter Record Number to Add Screen. 4. If you choose to add the entire database, the screen will display the number of records successfully added and the message "Press any key to continue...". Press any key to return to the Add a Database menu. You may now add another database, or press ESC to exit to the Utility Menu Screen. BACKUP AND COMPRESS CURRENT DATABASE 17 It is always good practice to keep a backup of your database and store it on a floppy diskette. If you do not do this and your database becomes corrupted, you may lose valuable information which could take many hours to re-enter back into the database. 1. From the Utility Menu Screen, select 2 or B : "Backup and compress current database". This selection will display the Backup and Compress Database Screen. 2. Type the name of the backup database. *This name must be different from the current database or an error will result. C-BASE will copy the current database to the backup database compressing (excluding) all deleted records (*normally deleted records remain in the database until a new record is added into its physical record position). The message "Creating backup database and index files" will appear on the screen. When the backup has been completed, the message "Backup database and index files successfully created" will flash. The Utility Menu Screen will then be displayed. *If you select a backup database which already exists, the message "Database already exists, do you wish to overwrite (Y/N)?" will be displayed. Type Y to delete and replace the existing database. Type N to enter another backup database name. Enter another database name or press ESC to return to the Utility Menu Screen. *If you wish to backup your database to a floppy diskette for safe keeping, select item 8 on the Utility Menu Screen, "Execute DOS" and type: COPY name.DAT diskname (where name is the backup database name and diskname is the diskname of your floppy disk drive, usually A: or B:). *To restore see section on Restoring a Backed up Database to Your Hard Disk in the Appendix. C U S T O M I Z I N G C- B A S E 18 1. From the Utility Menu Screen, select 3 or C : "Change default parameters". This selection will display the Change Default Parameters Screen. 2. There are three categories of program parameters which can be changed: 1) Screen Colors (Type C) 2) Program defaults (Type P) 3) Define list formats (Type D) 1 - CHANGE SCREEN COLORS 3. From the Change Default Parameters Screen, select C : "Change Colors". This selection will display the Color Menu Screen. *This selection is most effective if you have a color screen. 4. Use the UPARROW and DOWNARROW keys to make your selection, then press F to change the foreground color or B to change the background color of your selection (*the foreground or background mode will be displayed at the top of the screen). Once you have made your selection, repeatedly press F, B or ENTER to scroll through the possible colors (*there are sixteen foreground colors, eight background colors and four screen background patterns). Example: To change the foreground color of the inside of the box, move the cursor down to "3 - box inside color", then press F. Keep pressing the F key or ENTER until the desired color is reached. 5. When you have made a suitable color selection, you can save the colors by selecting S (Save current colors and exit). C-BASE will have these colors the next time it starts. If you decide to cancel your color selections, press R (Re-read in default colors). You may also select M (Mono screen default colors) to have C-BASE assign default mono-chrome screen colors or C (Color screen default colors) to have C-BASE assign default color screen colors. *Press ESC at any time to exit to the Change Default Parameters Screen. 19 2 - CHANGE DEFAULT PROGRAM PARAMETERS C-BASE has several default parameters it uses every time it starts. This option allows you to change some of these parameters and save them to a file for C-BASE to read in at startup. 3. From the Change Default Parameters Screen, select P : "Program defaults". This selection will display the Change Program Defaults Screen. 4. If you change any of these parameters, you can save them to a file so that every time you start C-BASE it will have the new parameters. Just enter the corresponding number of the parameter you wish to change, type in the new value and press ENTER. *To scan options in some parameters you can use the SPACE BAR (see below). 5. When you have made the changes you want, press ENTER and the following message will appear on the bottom line of the screen: "(S)ave change, (U)se for this session, (C)ancel or ESC to exit". Press S to save the changes to a file so that the next time C-BASE is started it will have the new parameters. Or press U to use the new parameters for only the current C-BASE session (changes are not saved). Or press C to cancel all the changes you have made and start over. Or press ESC to cancel the changes and return to the Change Default Parameters Screen. The following default program parameters can be changed: 0 - Company name: The name which appears at the top left-hand corner of the screen. Initially this parameter is set to "UNKNOWN COMPANY". 1 - Database name: The name of the default database (highlighted) to start C-BASE. If this parameter is blank, the first database on the Start with an Existing Database Screen menu will be highlighted. Initially this parameter is set to "CLIENTS". *Maximum length of this parameter is 8 characters. 2 - Error message delay time: The length of time in milliseconds that an error message is flashed on the screen. 3 - Message delay time: The length of time in milliseconds that a non-error message (such as "Record Inserted", "Record Deleted" etc.) is flashed on the screen. 20 4 - Date format: Dates can be displayed in the following formats: MM-DD-YY, DD-MM-YY or YY-MM-DD. Select the desired format using the SPACE BAR or type M for MM-DD-YY, D for DD-MM-YY or Y for YY-MM-DD. This parameter is initially set to MM-DD-YY. 5 - Sort field: This is the value of the Sort field when C-BASE starts. It is displayed just below your company name. It can, however, be changed at any time (see Scanning the Database section). Use the SPACE BAR to change this parameter or type N for Name, R for RefNo, D or E for EntryDate. This parameter is initially set to Name. 6 - Display RefNo with leading: Reference numbers can be displayed with or without leading zeros. Select whichever format you prefer. Use the SPACE BAR to change this parameter or type S for Spaces or Z for Zeros. This parameter is initially set to Spaces. 7 - List output format: This is the value of Output format for listing records. It can be changed at any time (see Output format in Listing Records section). This parameter is initially set to Line. 8 - List output device: This is the value of Output device for listing records. It can be changed at any time (see Output device in Listing Records section). This parameter is initially set to Screen. 9 - Execute DOS command: If this parameter is blank, selection 8, "Execute DOS" on the Utility Menu Screen will execute DOS from C-BASE. Type "EXIT" when you wish to return to C-BASE. If you instead would like to execute a DOS command, program or batch file from this menu selection, specify the DOS command line here (see section on Executing DOS). Example: To get a listing of all ".BAT" files in the C-BASE directory every time selection 8 is chosen from the Utility Menu Screen, set this parameter to: "DIR *.BAT". 3 - DEFINE A LIST FORMAT C-BASE allows you to save up to 10 list format files. Setting Output format to DefFmt in the List Records Screen will list records in one of 10 possible list formats which you defined and saved. 21 3. From the Change Default Parameters Screen, select D : "Define list format". This selection will display the Read in a List Format File Screen. 4. If you have already defined a list format and saved it, you may type in the number of the list format file for C-BASE to read in; if not, just press ENTER. This will display the Define List Output Text Screen. 5. Printing the Current Date You can have the current date appear on the output listing. The first parameter you can define is the date. First, type in the row and the column of where you want the date to appear (use the RIGHTARROW key to get to the column field) and press ENTER. Select a date format using the SPACE BAR and press ENTER. *If you do not wish to have any date appear on the output listing, enter 0 for both row and column. Defining Text You can define up to eight lines of text. First, type in the row and column where the text is to appear on the output listing, press ENTER and type in the text. *You can use any field editing keys (see Appendix for Field Editing Key explanation). *Use the "~" character to represent a form feed. 6. Press F1 to define the field positions (row and column) for each field in the record or ESC to discard your changes and exit. The Define List Field Positions Screen will appear. 7. This screen will allow you to define the row and column where you want each field of the record to be located on the output listing. If you do not want the field to be printed, then enter 0 for row and column. Enter the row and column for each field, then press F1 when done or ESC to discard changes and exit. *When the cursor is at the Customer name field, you may return to the Define List Output Text Screen by using the UPARROW key if you wish to make further changes to text. 8. After pressing F1, the following message will appear at the bottom line of the screen: "(S)ave change, (U)se for this session, (C)ancel or ESC to exit". Type S to save your defined list format to a file. The message "File number (0-9)?" will appear at the bottom of the screen. Select any number between 0 and 9. If the file already exists, C-BASE will ask if you want it to be replaced. If you enter Y, C-BASE will replace it, N and you may enter another number to save the file under. *Please note 0 is the default list format file which C-BASE initially reads in. To change the default file 0 to a new file without losing it, first save file 0 to any file from 1 to 9 before creating your new default file. If you type U, nothing is saved but the newly defined list format will be in effect (this is useful if you are trying see how different formats look so that once you have decided on the one that you want, you can save it). If you type C to cancel, C-BASE will cancel all of your changes but will return to the Define List Output Text Screen. If you press ESC, C-BASE will return to the Change Default Parameters Screen without changing anything. D E L E T I N G A N D R E N A M I N G D A T A B A S E S 21 1. From the Utility Menu Screen, select 4 or D : "Delete or Rename a database". This selection will display the Delete or Rename a Database Screen. 2. Select D to delete any C-BASE database or R to rename any C-BASE database. DELETE A DATABASE 3. This selection will display the Delete a Database Screen. 4. This selection allows you to delete any C-BASE database in the C-BASE directory. A menu of all C-BASE databases will appear on the screen. Select the database you wish to delete by using the UPARROW and DOWNARROW keys and press ENTER. *If you have more than 19 databases you may want to scroll up or down a screen by using the PGUP or PGDN keys. 5. A message to confirm deletion of the chosen database file will be displayed. If you type Y to confirm, C-BASE will delete the database. If you type N, the database will not be deleted. C-BASE will then return to the Delete a Database Screen. Press ESC if you wish to return to the Utility Menu Screen. *If you chose the current database to delete, C-BASE will return to the Opening Screen after the deletion. RENAME A DATABASE 3. This selection will display the Rename a Database Screen. 4. This selection allows you to rename any C-BASE database in the C-BASE directory. A menu of all C-BASE databases will appear on the screen. Select the database you wish to rename by using the UPARROW and DOWNARROW keys and press ENTER. *If you have more than 19 databases you may want to scroll up or down a screen by using the PGUP or PGDN keys. 5. C-BASE will display a screeen requesting the new name for the database. Enter the new name and the database will be renamed. If you chose a database name which already exists, C-BASE will flash an error message and allow you to enter another name. C-BASE will then return to the Rename a Database Screen. Press ESC if you wish to return to the Utility Menu Screen. R E B U I L D I N G I N D E X F I L E S 22 C-BASE databases have three index files to keep track of information, a Name, RefNo and Date index file is kept for each database. Index files tell C-BASE where a record is stored in the database file so that it can be retrieved very quickly. Sometimes the information from one index file does not agree with the information in another. System failures, poorly formatted disks, power glitches, etc. can all be possible causes. When rebuilding the index files, C-BASE reads each record from the database file and creates an index file to point to that record. file(s) be deleted accidently, this routine may be used to recreate them. 1. From the Utility Menu Screen, select 5 or R : "Rebuild index files for current database". The message "Rebuilding Index Files" will appear at the center of the screen. When the rebuild is complete, the message "Index files successfully created" will appear at the bottom of the screen and C-BASE will return to the Utility Menu Screen. Example: If when you list all records sorted by Name, you notice a record which is not found when listing all records sorted by RefNo, then rebuilding the index files should correct the problem. *If C-BASE encounters two records in the database file with the same Reference number, a "Duplicate Reference number" error message will flash at the bottom of the screen and the second record will not be inserted into any index files. However, the record will be listed on the screen with its RefNo and its record numbeer. To correct this problem, either change the RefNo of the record that was inserted by scanning for the RefNo and then modifying it, or delete this record and rebuild the index files again. *It is a good idea to rebuild the index files once in a while to maintain data integrity. Moreover, should any index file(s) be deleted accidentally, this routine may be used to recreate them. *If you start C-BASE with a database which is missing an index file, an error message will flash and this routine will automatically execute. S P E C I A L S E A R C H I N G 23 This feature is useful if you wish to find a record or records where you know some information in one or more fields but not enough to scan for Customer name or Reference number. 1. From the Utility Menu Screen, select 6 or S : "Special Search". This selection will display the Special Search Screen. 2. Type any characters in any of the fields anywhere in the record. C-BASE will search all records in the database until it finds a record which matches the characters in the positions you have specified (*C-BASE does not distinguish between upper and lower case letters for this search). When C-BASE finds a match, the record will be displayed with the message to continue. If you type Y, C-BASE will search for the next match. If you type N, C-BASE will allow you to enter a new search record or press ESC to return to the Utility Menu Screen. If C-BASE cannot find any more records, the message "No more records. Press any key to continue, ESC to exit..." will be displayed. If you press any key other than ESC, C-BASE will allow you to search for another record. Press ESC to return to the Utility Menu Screen. Example: You want to list all client records with Ottawa area addresses having Reference numbers which start with "001". Type "001 " for the Reference no. field and "613" for the area code portion of the Phone number field from the Special Search Screen. C-BASE will search through the database until it finds a record which matches this criteria. U N D E L E T I N G & D U P L I C A T I N G R E C O R D S 24 If you accidently delete a record, you can restore it if no new records have been added since the deletion. This routine can also be used to duplicate non-deleted records (after first changing the RefNos to avoid RefNo duplication. 1. From the Utility Menu Screen, select U or 7 : "Undelete a previously deleted record". This selection will display the List Records Screen with the Sort field set to "Deleted" (see Listing Records section to view the List Records Screen). *You can only get this Sort field value from this menu item. 2. Press ENTER from the list prompt to display all deleted records which can be restored. Make note of the RecNo (record number) of each record you wish to restore. OR If you know the Record number of the record you wish to restore or duplicate, press ESC to avoid the listing. *You may change the Sort field from Deleted to Name, RefNo or Date to determine the record numbers of the records you wish to duplicate. 3. The message "Press any key to continue... " will be displayed on the last line after the list. Press any key and the Enter record number you wish to restore screen will be displayed. Enter the RecNo (record number) you wish to restore or duplicate and C-BASE will display the record in insert mode. Press F1 and the record will be added to the database. If the Reference number of this record already exists in the database, a "Duplicate Reference Number" error will flash on the screen. Either change the RefNo and then press F1 or press ESC to exit. The Enter record number you wish to restore screen will be re-displayed and you can try entering another RecNo to restore or press ESC to exit to the Utility Menu Screen. E X E C U T I N G D O S 25 1. From the Utility Menu Screen, select E or 8 : "Execute DOS". If you defined an Execute DOS command, it will be executed (see Changing Default Program Parameters in the Customizing C-BASE section). If not, C-BASE will execute DOS. Type "EXIT" from DOS to return to C-BASE. *Note the characters "{C-BASE}" added to your DOS prompt. This is to remind you that you are running DOS under C-BASE. *Also C-BASE takes up a considerable amount of memory so that some programs may not load if memory is insufficient. A P P E N D I X 26 MENU FUNCTION KEYS Key Function CURSORDOWN Highlight next menu item CURSORUP Highlight previous menu item END Highlight last menu item HOME Highlight first menu item PGDN Scroll to next menu page PGUP Scroll to previous menu page ESC End menu and display previous menu or exit ENTER Select highlighted menu item Key Number Highlight and execute numbered menu item Key Letter Highlight and execute letter menu item *Note: PGUP and PGDN keys will not work unless there are more than 19 items in the menu. FIELD EDITING KEYS Key Function CTRL-BKSP Clear field BKSP Delete character to the left of cursor F1 Update record or store entered information DEL Delete character under cursor LEFTARROW Move cursor one position to the left RIGHTARROW Move cursor one position to the right INS Insert one space at the cursor position HOME Go to the first position in field END Go to the last character position in the field UPARROW Go to the previous field item 27 DOWNARROW Go to the next field item ENTER Enter field data into record and go to next field item CTRL-LEFTARROW Clear field to the left of cursor CTRL-RIGHTARROW Clear field to right of cursor ESC Exit and leave record unchanged ANYWHERE IN C-BASE Key Function CTRL-BREAK Abort C-BASE and return to DOS *Note: Dash signifies two keys pressed simultaneously. CLIENT RECORD FORMAT 28 Record field name Description Required Length Valid Chars Customer name Client or company name Yes 56 Any Reference no. Customer reference number Yes 5 Numeric Bus Phone + ext. Customer business phone no. & ext. No 15 Numeric Fax Customer fax phone number No 10 Numeric Home Customer home phone number No 10 Numeric Address lines 1-3 Customer mailing address No 56x3 Any Contact The person to contact No 56 Any EntryDate Automatically inserted No 8 NA Remarks 1-3 3 lines for additional info No 56x3 Any C-BASE FILES File name Description CBASE.DEF The initial default program parameters CBASE.DOC This documentation CBASE.EXE The C-BASE executable program COLORS.DEF The initial default program colors INSTALL.EXE The program used to install C-BASE LSTFMT(0-9).DEF The list format field position file LSTTEXT(0-9).DEF The list format output text definitions DATABASE FILE EXTENSIONS 29 A C-BASE database consists of four files (1 data file and 3 index files) all having the database name you have chosen from C-BASE with the following extensions: File extension Description .DAT The database file .IXN The Name (Customer name) index file .IXR The RefNo (Reference number) index file .IXD The Date (Entry date) index file TROUBLE SHOOTING GUIDE 30 This section describes what to do if you should happen to run into a problem. 1) If you cannot exit from somewhere If you find that C-BASE is not acknowledging your command to exit from some routine in the program, press CTRL-BREAK (hold the CTRL key down while pressing the BREAK key) and C-BASE will abort immediately. 2) If you get a "Turbo Access Error" Usually these errors occur if your database file is corrupted or your disk is full. Even though all the routines in this program have been thoroughly tested, it is possible something was missed. This error message should include the name of the database or index file which caused the error. The problem may be resolved by deleting the index file forcing an index file rebuild the next time you start C-BASE or by backing up the database (if the problem occurs after accessing a particular record) and using the backup database instead of the original. If the problem occurs on entry to C-BASE then you must use a backup copy of your database. If the problem is not due to a corrupted database file or your disk, please contact Custom Computing Solutions and we will be happy to assist you. 3) If your database becomes corrupted If for some reason C-BASE cannot read your database data file, then it has probably become corrupted or replaced by another file. In either case, if you have not previously done a backup of your database, you will have to re-enter all data manually back into the database. Otherwise you can run C-BASE with your backup database. If your backup database is on a floppy diskette, then perform the following procedure to copy it to your hard disk: RESTORING A BACKED UP DATABASE TO YOUR HARD DISK 31 If you backed up your C-BASE database to a floppy diskette as described in the section on Backup and Compress Current Database and you wish to restore, then perform the following steps: 1) Start DOS on your computer. 2) Insert the backup diskette into drive A. 3) Type COPY A:name.DAT C:\cbasedir. where: name is the backup database name cbasedir is the name of your C-BASE directory C is your hard disk letter *Please note that when you start C-BASE with this database, the Rebuild Index Files routine will automatically be called to rebuild the index files for this database since these files were not saved. *Also it is recommended that the corrupted database be deleted once the backup is in use (see section on Deleting and Renaming Databases). G L O S S A R Y 32 Character A letter, digit, space or any special symbol. Corrupted When the structure of the database file is no longer intact, it is said that the database is corrupted. Power failures or glitches, full disks, system failures, etc. can cause this problem. When this happens, the database is no longer usable and you must resort to a backup. Current directory The directory in which you are working. Cursor The flashing rectangular box on the screen marking the area where typed data will appear. Data Information coded and structured for processing by a computer. This information could reside on disk or in memory. Database The file where all data records are stored and retrieved. Default The value of a variable at the start of the program. Delete Mark record in the database as not in use. Disk A diskette or hard disk. Diskette A single or double sided 5 1/4 or 3 1/2 inch floppy disk. DOS The Disk Operating System is the software that tells the computer what to do (when you first power up, your computer will be running DOS). EntryDate or Entry date An eight (8) character field containing the system date when the record was entered into the database (the system automatically enters this value). Field One element of a record (e.g. Customer name, Reference number, and Phone number are all fields). File A named collection of data stored on disk. 33 Hard disk A sealed data storage device built into a computer. A hard disk can store many times more information than a floppy disk. Index File A file which links record field information to the record number where it is stored (e.g. the Name index file contains the Customer names and the record numbers where they are stored in the database). This file is sorted alphabetically so that records are retrieved very quickly. Memory The area where a computer temporarily stores data (usually referred to as RAM or Random Access Memory). Menu A selection of options listed on the screen, of which one must be chosen. Printer An output device which prints out characters or graphic symbols on paper. Record All of the information relating to one client (see section on Client Record Format in the Appendix for a description of the fields of a C-BASE record). Record number The physical position in the database file where the record is located. Recs: Tot and Used Tot: The total number of records in the database. Used: The difference between Tot and the number of deleted records. RefNo The Reference number field associated with any C-BASE record (this number can range from 1 to 65,535). Sort field The field by which the records will be sorted (either Name, RefNo or EntryDate). This value is displayed at the top left-hand corner of the screen under your company name. String A group of one of more characters in text form. Update Store the modified information. Value A quantity (numeric, character or string) assigned to a variable. Variable An identifier associated with a storage location in memory which has a value that can be changed.