home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
dbteach.zip
/
DBASE.002
< prev
next >
Wrap
Text File
|
1988-01-26
|
39KB
|
1,190 lines
INTRODUCTION TO dBASE III PLUS
--SESSION ONE--
Instructor: Barbara Slyker
------------------------------------------------------------------------------
SESSION ONE OBJECTIVES:
Students after completing session one should be able to:
1. Explain the concept of a database and how it is used
2. Explain why dBASE III PLUS is so widely used
3. Load dBASE III PLUS and use assist menus and screen prompts
4. Create a simple database
5. Add and view records and make simple corrections
6. Backup and quit dBASE III PLUS
7. Explain the importance of backup procedures with all programs
------------------------------------------------------------------------------
INSTRUCTOR OUTLINE AND COMMENTS FOR SESSION ONE
COMMENT: THIS OUTLINE CAN BE GIVEN TO STUDENTS DELETING SOME COMMENTS AND
ACTION LINES AS APPLICABLE
I. DATABASE FEATURES
A. GENERAL FEATURES
1. What is a database anyway?
An organized collection of related information
Examples: telephone book, address book, inventory, grades,
collections, accounts receivable, orders, purchases
For handling lots of related data; not a word processor or
spreadsheet
Analogy of paper and electronic databases
Data Processing - input, processing, output
Take time to set up properly
2. Fields, Records, Files, Database
Field = each item of information within a record;
example = last name
Record = each individual entry
example = all information for Ima Pig
File = all records together
Database = a database file or group of files containing records
of related data
B. Why dBASE III PLUS
1. Lots Users and support
2. Processing Data
CREATE, DATA ENTRY, UPDATE, SORT, RETRIEVE, REPORT
3. Application generator
A program that creates other dBASE programs and applications
4. The Assistant
Gives menus to make selections for creating and using a
database
5. The dot prompt
faster entry for issuing commands
all options available; more flexibility
must be able to use commands so this is a more advanced option
6. Programming Language - 4th Generation
To test for incorrect input, audit trail, prepare customized
reports, automate procedures, etc.
7. Networking
With Administrator supports Local Area Networks
8. Specifications
Number of records - 1 billion maximum
Fields - 128
Files - 15 open at a time
- 10 open database files
II. GETTING STARTED WITH .ASSIST
COMMENT: HANDS ON ACTIONS ARE GIVEN TO INDICATE WHERE STUDENT IS TO USE THE
COMPUTER. THESE MAY BE GROUPED TOGETHER OR INTERSPERSED BETWEEN
SHORT DISCUSSION PERIODS. THE INSTRUCTOR CAN GIVE THE DIRECTIONS
AHEAD AND THEN LET STUDENTS FOLLOW THE OUTLINE. ANOTHER POSSIBILITY
IS HAVING THE INSTRUCTOR "WALK-THROUGH" A FEW OF THE FIRST ACTIONS.
THIS IS DONE TO FAMILIARIZE THE STUDENTS WITH CAPABILITIES OF THE
PROGRAM. IT IS VERY IMPORTANT FOR STUDENTS TO REVIEW PROCEDURES
PRESENTED IN "WALK-THROUGHS" ON THEIR OWN--WITH INSTRUCTOR BEING
THERE TO HELP INDIVIDUALLY AS NEEDED. REVIEW SHOULD BE INCLUDED
BOTH VERBALLY AND MANUALLY THROUGHOUT THE SESSIONS.
ACTION: HAVE STUDENTS LOAD DBASE III
A. Loading dBASE III PLUS
ASSUMPTION: STUDENTS ARE USING A DUAL DRIVE SYSTEM WITH DRIVES A AND B
1. Put System Disk #1 in Drive A and data disk in Drive B (or DOS
disk first, if needed)
2. Turn on computer
3. Type: DBASE
4. When prompted to do so put System Disk #2 in Drive A
5. Press {ENTER}
CONVENTIONS USED: KEYS ARE IDENTIFIED BY PUTTING THE NAME OF THE KEY AS
WRITTEN ON MANY KEYBOARDS IN BRACKETS. EXAMPLE: {ESC}
MEANS THE ESCAPE KEY {CTRL}-{U} WITH A HYPHEN CONNECTING
THEM MEANS TO PRESS {U} WHILE HOLDING DOWN THE CONTROL KEY.
WORDS INSIDE QUOTES INDICATE IT IS A CHOICE ON AN ASSIST
MENU. EXAMPLE: "Database File" IS AN OPTION ON THE CREATE
MENU.
ACTION: HAVE STUDENTS LOOK AT SCREEN PROMPTS AND MENU OPTIONS
B. Screen Prompts and Menu Options
1. Menu Bar - contains eight menu selections
Set Up
Create
Update
Position
Retrieve
Organize
Modify
Tools
2. Date
3. Status bar - shows where you are within dBASE
4. Navigation Line - shows how to move around in current screen
5. Message Line
ACTION: HAVE STUDENTS MOVE AROUND MENUS; SHOW THEY HOW, THEN GIVE FREE
TIME TO EXPLORE
C. Moving within menus
1. Change menus - left and right arrow keys or initial letter
2. Move within a menu - up and down arrow keys
3. Select highlighted choice - {ENTER} key
4. Cancel menu selections - {ESC}
5. Get help - {F1}
COMMENT: BE SURE TO EMPHASIZE HELP FUNCTION
III. CREATING A DATABASE
COMMENT: DOT PROMPT COMMANDS ARE INCLUDED THROUGHOUT SO STUDENTS CAN START
SEEING WHAT THE COMMANDS WOULD BE LIKE. THEY SHOULD BE PRESENT ON
HAND-OUTS AND MIGHT BE DISCUSSED BRIEFLY AT THIS POINT DEPENDING ON
THE GROUP. THE MORE COMPUTER LITERATE THE GROUP THE EARLIER DOT
PROMPTS CAN BE INTRODUCED. IN FACT, EXCEPT FOR SHOWING THE OPTION
OF USING ASSIST MENUS, SOME INSTRUCTORS MAY PREFER NOT USING THEM AT
ALL. THE DOT PROMPTS ARE MUCH FASTER TO USE BUT SOME STUDENTS WILL
BE HAPPIER WORKING WITH THE MENUS. SEEING A SMALL DOT AT THE TOP
OF THE SCREEN CAN BE INTIMIDATING TO THE BEGINNER. MENUS DO GIVE
HINTS.
A. .SET DEFAULT TO B: - Select disk in drive B as data disk (if hard
disk is used this is not necessary)
1. Press T(ools) - to open the Tools Menu
2. Select "Set drive" and then "B"
B. .CREATE <database file name> - Start creating the database file
1. Press C(reate) - to open the Create Menu
2. Select "Database File" and accept drive B
3. Name the database with 8 characters and press {ENTER}; do not
add an extension--dBASE automatically adds .dbf
C. Create file structure
1. Importance of considering standardization of field names
within a company and planning
2. Enter field names
Begin with letter
Up to 10 characters--numbers, letters, underscore
NO spaces
3. Enter type
Character - won't be calculated
Numeric - numbers that can be calculated
Date
Logical - question with yes/no response
Memo - for adding notes
4. Width of fields
Select maximum number of characters in a field
Date entries assigned by dBASE to 8
Logical entries assigned by dBASE to 1
5. For numeric fields, number of decimals
6. {CTRL}-{END} - to save the file structure and
return to Assistant Menu
ACTION: HAVE STUDENTS CREATE A SMALL DATABASE, WITH 5 FIELDS AND ADD A
FEW RECORDS; EACH FIELD IN EACH RECORD DOES NOT HAVE TO BE ENTERED;
FILE COULD BE CALLED ADDRESS WITH THE FOLLOWING FIELDS (1) LNAME
(LAST NAME), (2) FNAME (FIRST NAME), (3) B_DATE (BIRTH DATE),
(4) B_CARD (SEND A BIRTHDAY CARD?, A LOGICAL FIELD TO ANSWER YES OR
NO), AND (5) A MEMO FIELD (TO PUT IN SHORT NOTES).
IV. ADDING AND VIEWING RECORDS
A. Typing in desired information
1. Type in desired information
2. Use up and down arrow keys to move to next field
3. Open the memo field by pressing {CTRL}-{PGDN}
4. Save the memo field by pressing {CTRL}-{PGUP}
B. Making corrections and Viewing
1. Use {Ins}, {Del}, left and right and left arrow keys to make
corrections
2. Press {PGUP} or {PGDN} to move through records
C. .LIST - Listing Records
1. {CTRL}-{END} to return to Assistant Menu
2. Open Retrieve Menu
3. Select "List" then select "Construct a field list"
4. Select desired fields
5. Return to Retrieve Menu with left or right arrow key
6. Select "Execute the command"
7. Press {N} to printer question
ACTION: HAVE STUDENTS ADD AND VIEW RECORDS IN THEIR ADDRESS DATABASE.
V. BACKUP AND QUITTING PROCEDURES
ACTION: HAVE STUDENTS COPY OPEN DATABASE FILE AND QUIT DBASE
A. IT'S VERY IMPORTANT TO BACKUP FILES FREQUENTLY
1. .COPY TO <filename.dbf> - Backup the database file you are
working on every 15 minutes by copying to a backup database
file
Open the Organize Menu
Select "Copy"
Indicate drive with data disk and type name of backup file;
could use BAK in file name to indicate it is a backup file
Execute the command
2. COPY *.* OR BACKUP *.* - Backup all files regularly
in DOS
B. .QUIT - Quitting dBASE III
1. Be careful to quit properly so all files will be closed
properly
2. Open the Set Up Menu and choose "Quit dBASE III" when exiting
ACTION: HAVE STUDENTS BACKUP THEIR DATABASE FILE AND QUIT dBASE
VI. REVIEW
COMMENT: BE SURE TO REVIEW SEVERAL TIMES DURING A SESSION. THE REVIEW WILL
DEPEND UPON THE BACKGROUND AND ABILITY OF THE STUDENTS, THEIR
QUESTIONS AND THEIR PROGRESS. IT SHOULD INCLUDE QUESTIONS,
DISCUSSION, AND AT TIMES A WRITTEN "QUIZ" CAN BE GIVEN TO DETERMINE
IP
QROGRESS. REVIEW AT THE END OF SESSION ONE COULD INCLUDE DOING THE
FIRST TWO ITEMS ON THE SHEET INCLUDED IN THIS COURSE ENTITLED "USING
A SAMPLE DATABASE FOR PERSONNEL". OR THIS SHEET MAY BE USED AS A
REVIEW AT THE BEGINNING OF SESSION TWO.
==============================================================================
INTRODUCTION TO dBASE III PLUS
--SESSION TWO--
Instructor: Barbara Slyker
------------------------------------------------------------------------------
SESSION TWO OBJECTIVES:
Students after completing session two should be able to:
1. Update a database file using append, edit, display, browse, delete,
recall and pack from the Update Menu Option
2. Retrieve information using "Display" in Retrieve Menu
3. Create a simple report form
4. Print a report form
5. Change the order of data using sort and index
------------------------------------------------------------------------------
INSTRUCTOR OUTLINE AND COMMENTS FOR SESSION TWO
COMMENT: THIS OUTLINE CAN BE GIVEN TO STUDENTS DELETING SOME COMMENTS
AND ACTION LINES AS APPLICABLE
COMMENT: DOT PROMPT COMMANDS ARE INCLUDED THROUGHOUT SO STUDENTS CAN START
SEEING WHAT THE COMMANDS WOULD BE LIKE. THEY SHOULD BE PRESENT
ON HANDOUTS AND MIGHT BE DISCUSSED BRIEFLY AT THIS POINT DEPENDING
ON THE GROUP.
I. REVIEW
ACTION: IF NOT DONE AT THE END OF SESSION ONE ABOVE, CREATE A DATABASE CALLED
EMPLOYEE DOING ITEMS 1 AND 2 ON THE HANDOUT ENTITLED "USING A SIMPLE
DATABASE FOR PERSONNEL"--THIS SHEET WILL BE REFERRED TO AS EMPLOYEE
HANDOUT.
II. UPDATING RECORDS
A. Load dBASE III PLUS as per steps in session one
B. .USE <database file> - to open a database file
1. From Set Up Menu select "Database File"
2. Choose drive containing database file
3. Select database file from submenu given
4. Type {N} in answer to "Is the File Indexed"
C. Commands to add, view and edit records from Update Menu Option
1. .APPEND
add new records to end of database file
review and edit previous files by pressing {PGUP}
2. .EDIT
edit or look at records, one at a time
first record in database file is displayed on entry screen
to scan records press {PGDN} and {PGUP}
importance of accurate data entry--Garbage In/Garbage Out
3. .DISPLAY
displays one to 15 records at a time
default scope = current record; where pointer is
scope = which records will be evaluated, in this case displayed
pointer = a number used by dBASE to identify the current record
4. .BROWSE
up to 17 records at a time may be displayed on the screen
in browse you can edit, append or display records
to pan (move off-screen information into view) press {CTRL} and
leave it down while pressing the right arrow key
ACTION: ADD RECORDS USING BROWSE (EMPLOYEE HANDOUT ITEMS 3 AND 4).
C. Position Pointer
1. Pointer points to current record
2. .GOTO TOP
Positions pointer at the first record
From Position Menu
Select "Goto record"
Select "Top"
D. Commands to mark records for deletion and delete them from a data-
base using the Update Menu Option
1. .DELETE
Marks a record for deletion
From Update Menu
Select Edit or Browse
Move cursor to desired record
Press {CTRL}-{U} to mark record
Press {CTRL}-{END} to save change made and exit
Edit or Browse
Press {ESC} to not save changes made
2. .RECALL
Unmarks all records previously marked for deletion
From Update Menu select "Recall"
3. .PACK
Takes a record completely out of a database
From Update Menu select "Pack"
Saves disk space but have no indication the record was once in
the database file
Always check records marked for deletion before packing
ACTION: DELETE, RECALL AND PACK RECORDS (EMPLOYEE HANDOUT ITEMS 5 AND 6).
III. RETRIEVING INFORMATION USING DISPLAY
A. Get into the Retrieve Menu
B. Select "Display"
1. Select "Specify scope"
2. From submenu select "Next" and press {ENTER}
3. Type number of records to display and then {ENTER}
4. Select "Construct a field list"
5. From submenu choose fields you want to display
6. Select "Build a search condition"
7. From submenu select field you want to search
8. From menu of what are called relational operators select
desired option -- relational operators are for relating either
characters, numbers or date expressions and include <, >, =.
<>, <= and >=.
ACTION: DISPLAY RECORDS (EMPLOYEE ITEM #7)
COMMENT: Selecting "Build a scope condition" is more advanced and will not be
covered now.
IV. REPORTS
A. Types of Reports that Can Be Generated
1. Include in discussion reports pertinent to what students will
be using
2. If possible, get actual reports
B. .REPORT FORM <filename> - Creating a Report-Format File
1. Select appropriate database without an index file
2. Open the Create Menu and select "Report"
3. Select drive to store report file
4. Enter Page Title
Press {ENTER} to enter Title options
Type up to a four line title
5. Make other changes to Options Menu as needed
Position cursor on option that you want to change
Press {ENTER} to enter the option
Type in changes as needed
Press the right arrow key to leave the Options Menu
C. Column Layout
1. Select "Contents" from the Columns Menu
2. Press {F10} to see a listing of fields for deciding which
fields to select
3. Select "Contents" and enter the field
4. Select "Heading" and go to line 3 to enter first line of a
two-line heading and then press {ENTER}
5. Select "Width" and change column width if needed
6. On the next line type the second line of the heading and then
press {ENTER}
7. Press {PGDN} to move to next column
8. Repeat steps 3 to 6 for each column you want to have printed
on your report
9. Save report-format file by entering the Exit Menu and selecting
"Save"
D. .REPORT FORM <filename> TO PRINT - To print report
1. Select desired database (without index file) in Set Up Menu
2. From Retrieve Menu select "Report"
3. Choose "Execute the command"
V. CHANGING THE ORDER OF YOUR DATA
A. Sorting
1. Creates a new database file sorted in the way you specify
2. Must use the new file if you want information the way you
sorted it
3. .SORT ON <desired field> TO <new database filename>
use menu prompts under Organize Menu to choose
sort commands
example .SORT ON LASTNAME TO EMP_LAST
NOTICE DOT COMMAND PROMPTS BEING AUTOMATICALLY PRINTED BY
dBASE III ON THE BOTTOM OF THE SCREEN WHEN YOU SELECT
DIFFERENT OPTIONS FROM THE ORGANIZE MENU
4. Uses lots of disk space and after new records are added a new
file must be made to keep the order correct
5. To use a sorted file in the Set Up menu select the sorted
database filename.
6. Difference between viewing and changing data (viewing, sorting,
editing, etc.)
ACTION: CREATE AND USE A SORTED FILE (EMPLOYEE HANDOUT ITEM 9).
B. Indexing
1. Creates a small file that tells dBASE III PLUS the order to
LIST records relates back to main database file and can be
updated automatically when records are added to the database
files
2. .INDEX ON <desired field> TO <index filename>
use menu prompts under Organize Menu to choose
index commands
example .INDEX ON LNAME+FNAME TO EMPL_LAST
NOTICE DOT COMMAND PROMPTS BEING AUTOMATICALLY PRINTED BY
dBASE III ON THE BOTTOM OF THE SCREEN WHEN YOU SELECT
DIFFERENT OPTIONS FROM THE ORGANIZE MENU
3. Using an Index File
In the Set Up Menu select "Database file"
Select the appropriate drive and answer {Y} to the prompt "Is
the file indexed?"
Select appropriate index file
Press the right arrow key to exit the submenu
When records are listed they are listed in order of the index
file
ACTION: CREATE AND USE AN INDEXED FILE (EMPLOYEE HANDOUT ITEM 10).
VI. REVIEW
A. Update Menu - Briefly review the options
B. Organize Menu - Briefly review Index and Sort
==============================================================================
INTRODUCTION TO dBASE III PLUS
--SESSION THREE--
Instructor: Barbara Slyker
------------------------------------------------------------------------------
SESSION THREE OBJECTIVES:
Students after completing session three should be able to:
1. Use dot prompts to give commands to dBASE III
2. Recognize a few of the most common file extensions and their
use
3. Use the Tools Menu to set drive, copy files, get a directory,
rename a file, erase a file and list structure
4. Use a customized data entry screen
------------------------------------------------------------------------------
INSTRUCTOR OUTLINE AND COMMENTS FOR SESSION THREE
I. REVIEW
II. DOT COMMANDS
A. Getting to dot prompt from Assist
1. Press {ESC} from the Assistant main menu
2. The dot prompt "." will appear followed by cursor
3. Cursor = flashing rectangle on screen that is indicates where
information will be entered on the screen
4. Status bar on bottom of screen displays current operation or
command, current drive, file in use, and other information
depending on commands being used.
B. Don't worry about memorizing all commands!!! Don't have to!
1. Help can be used as you go along to learn the commands
ACTION: PRESS {F1} OR TYPE HELP AT THE DOT PROMPT. LOOK AT MENUS AVAILABLE IN
HELP. GIVE STUDENTS TIME TO EXPLORE.
2. Using help is easiest because it is always there and can't
be misplaced but an alternatives include
dBASE III PLUS Quick Reference Guide
Summary of dBASE III Commands as found in Que Corporations
dBASE III Handbook
dBASE III PLUS Manual--Learning and Using dBASE III PLUS,
chapter on commands (Chapter 5 of Using dBASE III PLUS)
COMMENT: These review some of the commands already used in previous session
but use the dot prompt instead of the assist menus. Each of these
commands need not be presented in discussion, depending upon the
group. Most of them are self-explanatory and students can try them
using a database already created.
ACTION: CHANGE BACK AND FORTH FROM ASSIST MENUS TO THE DOT PROMPT.
C. Syntax of dot commands
1. Syntax = way command is structured (Example: in English
sentences are formed in certain ways; in dBASE, commands are
written following certain "rules"
2. .VERB [<scope>] [<expression list>] [FOR <condition>]
.DISPLAY ALL LASTNAME, SALARY FOR SALARY > 10
Scope = which records will be evaluated
RECORD <n> - one selected record
NEXT <n> - next so many <n> records selected
REST - beginning with current record to end
ALL - all records selected
Expression list = in our case a list of field names
FOR condition = to display specific records meeting a particu-
lar requirement
D. Examples of dot commands
1. .SET DEFAULT TO B: - makes drive b the drive where files
are stored
2. .USE <FILE NAME> - opens a database file
3. .HELP - opens help menus
4. .APPEND - adds a data record to end of a data-
base file
5. .LIST - shows contents of records of
database file
6. .DISPLAY - shows current record
7. .DISPLAY ALL OFF - shows all records without record
numbers being displayed
8. .DISPLAY ALL <FIELD NAME>, <FIELD NAME> - displays field con-
tents of current record of the database file in use
9. .DISPLAY ALL FOR <FIELD NAME> = '<character string>' -
displays all records that contain the word enclosed by
apostrophes; example = .DISPLAY ALL FOR LASTNAME = 'SMITH'
assuming there is a field name spelled "LASTNAME"
10. .DISPLAY FOR <FIELD NAME> > <number> - displays first record
that that has number greater than indicated in the field
name chosen
11. .DISPLAY STRUCTURE - displays data structure of active
database file
12. .DISPLAY FILES LIKE *.* - displays all files on current drive
13. .DISPLAY FILES - displays all database files
14. .GO TOP - positions record pointer at to top
(first) record
15. .INDEX ON <FIELD NAME> TO <INDEX FILENAME> - creates an index
file that allows database to be displayed in a certain order
16. .EDIT 2 - displays record 2 for editing
17. .BROWSE <FIELD NAME>,<FIELD NAME> - shows up to 17 records at
once from active database file to look at or change
18. .DELETE - marks current record for deletion
19. .RECALL - unmarks all records that were pre-
viously marked for deletion
20. .PACK - removes all records marked for
deletion from the database
21. .CREATE <DATABASE FILENAME> - creates a new database file
22. .COPY TO <FILENAME> - makes a backup copy of the active
database file
ACTION: USE ONE OF THE DATABASE FILES ALREADY CREATED TO EXPERIMENT WITH THESE
DIFFERENT DOT PROMPT COMMANDS.
COMMENT: SEE HANDOUTS "GETTING TO dBASE III PLUS DOT COMMANDS", AND "RETRIEVING
INFORMATION" INCLUDED IN THIS COURSE OUTLINE.
III. FILE EXTENSIONS
A. What is a File Extension?
1. A filename consists of up to 8 characters
2. A file extension is the period and up to 3 characters that
come at the end of a file name
8.3 format
example = address.dbf
B. Default File Identifier
1. This is the file extension that dBASE automatically adds to a
file you name
2. Used to help determine the type of file when seeing a directory
of filenames, whether it is a database file, a report form
file, etc.
3. You can type in a file identifier if you wish, but then the
identifier must be included with the filename whenever you
want to use the file--so let dBASE automatically add the
file extension
C. Some of the dBASE File Extensions
1. .dbf = database file
2. .dbt = database memo files
3. .frm = report form files
4. .ndx = index file
IV. USING TOOLS FROM THE ASSIST MENUS
A. .SET DEFAULT TO <drive:>
1. Can change default drive by using this option
2. Can also set a drive in the Set Up Menu when opening a
database file
3. Select "Set drive"
4. Select disk drive to make current
B. .COPY FILE <source filename> TO <target filename>
1. Copies any file to a new file--makes a backup
COMMENT: In the Organize Menu selecting copy copies only the open database
file to another file.
2. Select "Copy File" in the Tools Menu
3. Select disk drive to find the source file
4. Select the existing (source) file
5. Select drive to store new file
6. Enter name of the new file
C. .DIR
1. Displays contents of a disk directory
2. Select "Directory" in the Tools Menu
3. Select disk drive to find the files
4. Select file type that you wanted displayed--database,
index, etc. (see file extensions below)
D. .RENAME <old filename> TO <new filename>
1. Renames a file - extension must be included
2. Select "Rename" in the Tools Menu
3. Select name of file to rename
4. Enter new filename
E. .ERASE <filename>
1. Deletes a file from the disk - file extensions must be included
2. Select "Erase" from the Tools Menu
3. Select disk drive that contains the file
4. Type the name of the file and press {ENTER}
5. NO SECOND CHANCE IS GIVEN SO BE CAREFUL!!!
6. Press {ESC} before completing step four above if you don't want
to erase the file
F. .LIST STRUCTURE
1. Displays the structure of an open database file
2. Select "List structure" from the Tools Menu
3. Answer {N} or {Y} to indicate no, do not direct the output to
the printer or yes, direct output to printer
V. SUMMARIZING DATA
A. .SUM
1. From Retrieve Menu Select "Sum"
2. Select "Construct a field list"
3. Select numeric field to be added
4. If desired, build a search condition and/or scope as explained
in Session Two under Retrieving Information Using Display
5. Select "Execute the Command"
B. .AVERAGE
1. From Retrieve Menu Select "Average"
2. Follow steps 2 to 5 as in "Sum" above
C. .COUNT - counts how many records match a certain condition
1. From Retrieve Menu Select "Count"
2. Follow steps 2 to 5 as in "Sum" above except that fields don't
have to be numeric
ACTION: WITH APPROPRIATE DATABASE FILE HAVE STUDENTS EXPERIMENT WITH SUM,
AVERAGE AND COUNT
VI. USING CUSTOMIZED DATA ENTRY SCREENS
COMMENT: SESSION THREE MAY BE TOO LONG--THIS COULD BE PRESENTED IN SESSION
FOUR
A. What is a Data Entry Screen?
1. When a database is created dBASE sets up a form starting from
the upper left corner of screen with each field name starting
on the left column
2. The default format may be changed by creating a screen format
with more descriptive prompts replacing field names
3. Position of fields on screen may be changed to make a more
interesting display
B. .SET FORMAT TO <filename> - to use a customized format while
entering data
1. When starting to use a database the screen format will be the
default that dBASE creates (with one field name per line
starting at left corner) unless a custom format you create is
selected
2. To select custom format file
Highlight the Set Up Menu
Select "Format for Screen"
Choose drive containing format file
Select name of format file from submenu given
ACTION: HAVE SAMPLE FILE ON STUDENTS DISK SO THEY CAN SELECT A CUSTOM FORMAT
FILE TO USE WHILE EDITING A DATABASE
VII. REVIEW
==============================================================================
EXTRAS DEPENDING ON THE GROUP
I. CREATING AND PRINTING LABELS
COMMENT: DEPENDING UPON THE GROUP, CREATING A LABEL FILE CAN BE SKIPPED WITH
STUDENTS JUST PRINTING LABELS--A SAMPLE LABEL FILE (EXTENSION .LBL)
COULD BE SAVED ONTO STUDENTS' DISKS WITH A CORRESPONDING DATABASE SO
THAT STUDENTS COULD PRINT THE LABELS WITHOUT HAVING TO CREATE THEM.
A. Creating a Label File
1. Select appropriate database file and index file that includes
enough information to make a label
2. Open the Create Menu and select "Label"
3. Select drive to store label file
4. Enter name of label file
5. Select size of labels and change other label characteristics
as needed
B. Label Contents
1. Open Contents Menu and move to line 2
2. Press {F10} to see field submenu
3. Select field with first name in it
4. Enter a comma
5. Press {F10} again and select field with the last name in it
6. Press {ENTER} to leave second line of label
7. Put the address field on line 3 and press {ENTER}
8. Put the city, state, and zip field on line 4 ending with the
following:
CITY," "STATE," ",ZIP
9. Open Edit Menu and select "Save"
C. Printing Labels
1. Select desired database and index file in Set Up Menu
2. From Retrieve Menu select "Label"
3. Choose "Execute the command"
ACTION: CREATE LABELS WITH AN EXISTING DATABASE AND PRINT IF PRINTER IS
AVAILABLE
II. .CREATE SCREEN <filename>
COMMENT: REFER TO USING CUSTOMIZED DATA ENTRY SCREENS IN SESSION THREE.
A. Getting Started
1. Open the Create Menu
2. Select "Format"
3. Enter the name of the form you're creating; could have part of
database file name in the format file name so it could be
recognized later
4. Select the desired database file from the file list given
5. Choose "Load Selected Files"
6. Mark the desired fields by pressing {ENTER}
7. MOve to the next menu by pressing the left or right arrow
B. Getting into the blackboard
1. Press {F10} to access the Screen Painter Menu
2. Press {ENTER} at the beginning of a line while in Insert mode
to enter blank lines
3. Type over old filed name in Overwrite mode and Insert mode as
needed
field names can be changed to be more informative for data
entry
the field names are only changed in the entry screen; they are
not changed in the database structure
4. Moving fields
Place the cursor at the beginning of the highlight of the field
you want to move and press {ENTER}
Place the cursor where you want field to be located and press
{ENTER}
Retype the label in the new location and delete the old label
using the {DEL} key
5. Putting boxes around fields
Insert one space before each line that starts on column 1 so
there is room to make a box; otherwise, any letter in column 1
will be hidden
Press {F10} to return to the Assist Menus
Open the Options Menu
Select "Draw a Window"
Place cursor in upper left corner of the box you want to make
and press {ENTER} (be sure the box will be in a blank position
without any characters)
Place cursor in lower right corner of the box and press {ENTER}
If box is too small and has covered data don't panic; put
on any line of the box and press {CTRL}-{U} to delete it
To decrease the size of a box put the cursor on any side or
corner of the box, press {ENTER}, move the cursor to where
you want the box, and press {ENTER} again.
6. Saving the format
Press {F10} to return to Assist Menus
Open the Exit Menu
Select "Save"
ACTION: MAKE A CUSTOMIZED DATA ENTRY FORM
III. USING THE MODIFY MENU
A. Use Screen Prompts and Help Facility
B. Modify Database Structure
C. Modify Report Forms
HAPPY COMPUTING WITH dBASE III PLUS!!!
Barbara Slyker