home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / dbteach.zip / DBASE.002 < prev    next >
Text File  |  1988-01-26  |  39KB  |  1,190 lines

  1.  
  2.  
  3.  
  4.  
  5.                  INTRODUCTION TO dBASE III PLUS
  6.                          --SESSION ONE--
  7.  
  8.                    Instructor:  Barbara Slyker
  9.  
  10.  
  11. ------------------------------------------------------------------------------
  12.  
  13. SESSION ONE OBJECTIVES:
  14.  
  15. Students after completing session one should be able to:
  16.  
  17.         1.  Explain the concept of a database and how it is used
  18.  
  19.         2.  Explain why dBASE III PLUS is so widely used
  20.  
  21.         3.  Load dBASE III PLUS and use assist menus and screen prompts
  22.  
  23.         4.  Create a simple database
  24.  
  25.         5.  Add and view records and make simple corrections
  26.  
  27.         6.  Backup and quit dBASE III PLUS
  28.  
  29.         7.  Explain the importance of backup procedures with all programs
  30.  
  31. ------------------------------------------------------------------------------
  32.  
  33.  
  34.          INSTRUCTOR OUTLINE AND COMMENTS FOR SESSION ONE
  35.  
  36.  
  37. COMMENT:  THIS OUTLINE CAN BE GIVEN TO STUDENTS DELETING SOME COMMENTS AND
  38.           ACTION LINES AS APPLICABLE
  39.  
  40.  
  41.     I.  DATABASE FEATURES
  42.  
  43.         A.  GENERAL FEATURES
  44.  
  45.             1.  What is a database anyway?
  46.  
  47.                 An organized collection of related information
  48.  
  49.                 Examples:  telephone book, address book, inventory, grades,
  50.                 collections, accounts receivable, orders, purchases
  51.  
  52.                 For handling lots of related data; not a word processor or
  53.                 spreadsheet
  54.  
  55.                 Analogy of paper and electronic databases
  56.  
  57.                 Data Processing - input, processing, output
  58.  
  59.                 Take time to set up properly
  60.  
  61.            2.   Fields, Records, Files, Database
  62.  
  63.                 Field = each item of information within a record;
  64.                 example = last name
  65.  
  66.                 Record = each individual entry
  67.                 example = all information for Ima Pig
  68.  
  69.                 File =  all records together
  70.  
  71.                 Database = a database file or group of files containing records
  72.                 of related data
  73.  
  74.         B.  Why dBASE III PLUS
  75.  
  76.             1.  Lots Users and support
  77.  
  78.             2.  Processing Data
  79.  
  80.                 CREATE, DATA ENTRY, UPDATE, SORT, RETRIEVE, REPORT
  81.  
  82.             3.  Application generator
  83.  
  84.                 A program that creates other dBASE programs and applications
  85.  
  86.             4.  The Assistant
  87.  
  88.                 Gives menus to make selections for creating and using a
  89.                 database
  90.  
  91.             5.  The dot prompt
  92.  
  93.                 faster entry for issuing commands
  94.  
  95.                 all options available; more flexibility
  96.  
  97.                 must be able to use commands so this is a more advanced option
  98.  
  99.             6.  Programming Language - 4th Generation
  100.  
  101.                 To test for incorrect input, audit trail, prepare customized
  102.                 reports, automate procedures, etc.
  103.  
  104.             7.  Networking
  105.  
  106.                 With Administrator supports Local Area Networks
  107.  
  108.             8.  Specifications
  109.  
  110.                 Number of records - 1 billion maximum
  111.  
  112.                 Fields            - 128
  113.  
  114.                 Files             - 15 open at a time
  115.                                   - 10 open database files
  116.  
  117.    II.  GETTING STARTED WITH .ASSIST
  118.  
  119. COMMENT:  HANDS ON ACTIONS ARE GIVEN TO INDICATE WHERE STUDENT IS TO USE THE
  120.           COMPUTER.  THESE MAY BE GROUPED TOGETHER OR INTERSPERSED BETWEEN
  121.           SHORT DISCUSSION PERIODS.  THE INSTRUCTOR CAN GIVE THE DIRECTIONS
  122.           AHEAD AND THEN LET STUDENTS FOLLOW THE OUTLINE.  ANOTHER POSSIBILITY
  123.           IS HAVING THE INSTRUCTOR "WALK-THROUGH" A FEW OF THE FIRST ACTIONS.
  124.           THIS IS DONE TO FAMILIARIZE THE STUDENTS WITH CAPABILITIES OF THE
  125.           PROGRAM.  IT IS VERY IMPORTANT FOR STUDENTS TO REVIEW PROCEDURES
  126.           PRESENTED IN "WALK-THROUGHS" ON THEIR OWN--WITH INSTRUCTOR BEING
  127.           THERE TO HELP INDIVIDUALLY AS NEEDED.  REVIEW SHOULD BE INCLUDED
  128.           BOTH VERBALLY AND MANUALLY THROUGHOUT THE SESSIONS.
  129.  
  130. ACTION:  HAVE STUDENTS LOAD DBASE III
  131.  
  132.         A.  Loading dBASE III PLUS
  133.  
  134. ASSUMPTION:  STUDENTS ARE USING A DUAL DRIVE SYSTEM WITH DRIVES A AND B
  135.  
  136.             1.  Put System Disk #1 in Drive A and data disk in Drive B (or DOS
  137.                 disk first, if needed)
  138.  
  139.             2.  Turn on computer
  140.  
  141.             3.  Type:  DBASE
  142.  
  143.             4.  When prompted to do so put System Disk #2 in Drive A
  144.  
  145.             5.  Press {ENTER}
  146.  
  147. CONVENTIONS USED:  KEYS ARE IDENTIFIED BY PUTTING THE NAME OF THE KEY AS
  148.                    WRITTEN ON MANY KEYBOARDS IN BRACKETS.  EXAMPLE:  {ESC}
  149.                    MEANS THE ESCAPE KEY {CTRL}-{U} WITH A HYPHEN CONNECTING
  150.                    THEM MEANS TO PRESS {U} WHILE HOLDING DOWN THE CONTROL KEY.
  151.                    WORDS INSIDE QUOTES INDICATE IT IS A CHOICE ON AN ASSIST
  152.                    MENU.  EXAMPLE:  "Database File" IS AN OPTION ON THE CREATE
  153.                    MENU.
  154.  
  155. ACTION:  HAVE STUDENTS LOOK AT SCREEN PROMPTS AND MENU OPTIONS
  156.  
  157.         B.  Screen Prompts and Menu Options
  158.  
  159.             1.  Menu Bar - contains eight menu selections
  160.  
  161.                 Set Up
  162.                 Create
  163.                 Update
  164.                 Position
  165.                 Retrieve
  166.                 Organize
  167.                 Modify
  168.                 Tools
  169.  
  170.             2.  Date
  171.  
  172.             3.  Status bar - shows where you are within dBASE
  173.  
  174.             4.  Navigation Line - shows how to move around in current screen
  175.  
  176.             5.  Message Line
  177.  
  178.  
  179. ACTION: HAVE STUDENTS MOVE AROUND MENUS; SHOW THEY HOW, THEN GIVE FREE
  180.         TIME TO EXPLORE
  181.  
  182.         C.  Moving within menus
  183.  
  184.             1.  Change menus - left and right arrow keys or initial letter
  185.  
  186.             2.  Move within a menu - up and down arrow keys
  187.  
  188.             3.  Select highlighted choice - {ENTER} key
  189.  
  190.             4.  Cancel menu selections - {ESC}
  191.  
  192.             5.  Get help - {F1}
  193.  
  194.  
  195. COMMENT:  BE SURE TO EMPHASIZE HELP FUNCTION
  196.  
  197.  
  198.   III.  CREATING A DATABASE
  199.  
  200.  
  201. COMMENT:  DOT PROMPT COMMANDS ARE INCLUDED THROUGHOUT SO STUDENTS CAN START
  202.           SEEING WHAT THE COMMANDS WOULD BE LIKE.  THEY SHOULD BE PRESENT ON
  203.           HAND-OUTS AND MIGHT BE DISCUSSED BRIEFLY AT THIS POINT DEPENDING ON
  204.           THE GROUP.  THE MORE COMPUTER LITERATE THE GROUP THE EARLIER DOT
  205.           PROMPTS CAN BE INTRODUCED.  IN FACT, EXCEPT FOR SHOWING THE OPTION
  206.           OF USING ASSIST MENUS, SOME INSTRUCTORS MAY PREFER NOT USING THEM AT
  207.           ALL.  THE DOT PROMPTS ARE MUCH FASTER TO USE BUT SOME STUDENTS WILL
  208.           BE HAPPIER WORKING  WITH THE MENUS.  SEEING A SMALL DOT AT THE TOP
  209.           OF THE SCREEN CAN BE INTIMIDATING TO THE BEGINNER.  MENUS DO GIVE
  210.           HINTS.
  211.  
  212.  
  213.         A.  .SET DEFAULT TO B: - Select disk in drive B as data disk  (if hard
  214.             disk is used this is not necessary)
  215.  
  216.             1.  Press T(ools) - to open the Tools Menu
  217.  
  218.             2.  Select "Set drive" and then "B"
  219.  
  220.         B.  .CREATE <database file name> - Start creating the database file
  221.  
  222.             1.  Press C(reate) - to open the Create Menu
  223.  
  224.             2.  Select "Database File" and accept drive B
  225.  
  226.             3.  Name the database with 8 characters and press {ENTER}; do not
  227.                 add an extension--dBASE automatically adds .dbf
  228.  
  229.         C.  Create file structure
  230.  
  231.             1.  Importance of considering standardization of field names
  232.                 within a company and planning
  233.  
  234.             2.  Enter field names
  235.  
  236.                 Begin with letter
  237.  
  238.                 Up to 10 characters--numbers, letters, underscore
  239.  
  240.                 NO spaces
  241.  
  242.  
  243.             3.  Enter type
  244.  
  245.                 Character - won't be calculated
  246.  
  247.                 Numeric - numbers that can be calculated
  248.  
  249.                 Date
  250.  
  251.                 Logical - question with yes/no response
  252.  
  253.                 Memo - for adding notes
  254.  
  255.  
  256.             4.  Width of fields
  257.  
  258.                 Select maximum number of characters in a field
  259.  
  260.                 Date entries assigned by dBASE to 8
  261.  
  262.                 Logical entries assigned by dBASE to 1
  263.  
  264.  
  265.             5.  For numeric fields, number of decimals
  266.  
  267.  
  268.             6.  {CTRL}-{END} - to save the file structure and
  269.                 return to Assistant Menu
  270.  
  271. ACTION:  HAVE STUDENTS CREATE A SMALL DATABASE, WITH 5 FIELDS AND ADD A
  272.          FEW RECORDS; EACH FIELD IN EACH RECORD DOES NOT HAVE TO BE ENTERED;
  273.          FILE COULD BE CALLED ADDRESS WITH THE FOLLOWING FIELDS (1) LNAME
  274.          (LAST NAME), (2) FNAME (FIRST NAME), (3) B_DATE (BIRTH DATE),
  275.          (4) B_CARD (SEND A BIRTHDAY CARD?, A LOGICAL FIELD TO ANSWER YES OR
  276.          NO), AND (5) A MEMO FIELD (TO PUT IN SHORT NOTES).
  277.  
  278.  
  279.    IV.  ADDING AND VIEWING RECORDS
  280.  
  281.         A.  Typing in desired information
  282.  
  283.             1.  Type in desired information
  284.  
  285.             2.  Use up and down arrow keys to move to next field
  286.  
  287.             3.  Open the memo field by pressing {CTRL}-{PGDN}
  288.  
  289.             4.  Save the memo field by pressing {CTRL}-{PGUP}
  290.  
  291.  
  292.         B.  Making corrections and Viewing
  293.  
  294.             1.  Use {Ins}, {Del}, left and right and left arrow keys to make
  295.                 corrections
  296.  
  297.             2.  Press {PGUP} or {PGDN} to move through records
  298.  
  299.  
  300.         C.  .LIST - Listing Records
  301.  
  302.             1.  {CTRL}-{END} to return to Assistant Menu
  303.  
  304.             2.  Open Retrieve Menu
  305.  
  306.             3.  Select "List" then select "Construct a field list"
  307.  
  308.             4.  Select desired fields
  309.  
  310.             5.  Return to Retrieve Menu with left or right arrow key
  311.  
  312.             6.  Select "Execute the command"
  313.  
  314.             7.  Press {N} to printer question
  315.  
  316.  
  317. ACTION:  HAVE STUDENTS ADD AND VIEW RECORDS IN THEIR ADDRESS DATABASE.
  318.  
  319.     V.  BACKUP AND QUITTING PROCEDURES
  320.  
  321.  
  322. ACTION:  HAVE STUDENTS COPY OPEN DATABASE FILE AND QUIT DBASE
  323.  
  324.  
  325.         A.  IT'S VERY IMPORTANT TO BACKUP FILES FREQUENTLY
  326.  
  327.             1.  .COPY TO <filename.dbf> - Backup the database file you are
  328.                 working on every 15 minutes by copying to a backup database
  329.                 file
  330.  
  331.                 Open the Organize Menu
  332.  
  333.  
  334.                 Select "Copy"
  335.  
  336.                 Indicate drive with data disk and type name of backup file;
  337.                 could use BAK in file name to indicate it is a backup file
  338.  
  339.                 Execute the command
  340.  
  341.             2.  COPY *.* OR BACKUP *.* - Backup all files regularly
  342.                 in DOS
  343.  
  344.         B.  .QUIT - Quitting dBASE III
  345.  
  346.             1.  Be careful to quit properly so all files will be closed
  347.                 properly
  348.  
  349.             2.  Open the Set Up Menu and choose "Quit dBASE III" when exiting
  350.  
  351. ACTION:  HAVE STUDENTS BACKUP THEIR DATABASE FILE AND QUIT dBASE
  352.  
  353.    VI.  REVIEW
  354.  
  355. COMMENT:  BE SURE TO REVIEW SEVERAL TIMES DURING A SESSION.  THE REVIEW WILL
  356.           DEPEND UPON THE BACKGROUND AND ABILITY OF THE STUDENTS, THEIR
  357.           QUESTIONS AND THEIR PROGRESS.  IT SHOULD INCLUDE QUESTIONS,
  358.           DISCUSSION, AND AT TIMES A WRITTEN "QUIZ" CAN BE GIVEN TO DETERMINE
  359. IP
  360. QROGRESS.  REVIEW AT THE END OF SESSION ONE COULD INCLUDE DOING THE
  361.           FIRST TWO ITEMS ON THE SHEET INCLUDED IN THIS COURSE ENTITLED "USING
  362.           A SAMPLE DATABASE FOR PERSONNEL".  OR THIS SHEET MAY BE USED AS A
  363.           REVIEW AT THE BEGINNING OF SESSION TWO.
  364.  
  365.  
  366. ==============================================================================
  367.  
  368.  
  369.  
  370.  
  371.  
  372.                  INTRODUCTION TO dBASE III PLUS
  373.                          --SESSION TWO--
  374.  
  375.                    Instructor:  Barbara Slyker
  376.  
  377.  
  378. ------------------------------------------------------------------------------
  379.  
  380. SESSION TWO OBJECTIVES:
  381.  
  382. Students after completing session two should be able to:
  383.  
  384.         1.  Update a database file using append, edit, display, browse, delete,
  385.             recall and pack from the Update Menu Option
  386.  
  387.         2.  Retrieve information using "Display" in Retrieve Menu
  388.  
  389.         3.  Create a simple report form
  390.  
  391.         4.  Print a report form
  392.  
  393.         5.  Change the order of data using sort and index
  394.  
  395.  
  396. ------------------------------------------------------------------------------
  397.  
  398.  
  399.          INSTRUCTOR OUTLINE AND COMMENTS FOR SESSION TWO
  400.  
  401.  
  402. COMMENT:  THIS OUTLINE CAN BE GIVEN TO STUDENTS DELETING SOME COMMENTS
  403.           AND ACTION LINES AS APPLICABLE
  404.  
  405. COMMENT:  DOT PROMPT COMMANDS ARE INCLUDED THROUGHOUT SO STUDENTS CAN START
  406.           SEEING WHAT THE COMMANDS WOULD BE LIKE.  THEY SHOULD BE PRESENT
  407.           ON HANDOUTS AND MIGHT BE DISCUSSED BRIEFLY AT THIS POINT DEPENDING
  408.           ON THE GROUP.
  409.  
  410.  
  411.  
  412.     I.  REVIEW
  413.  
  414. ACTION:  IF NOT DONE AT THE END OF SESSION ONE ABOVE, CREATE A DATABASE CALLED
  415.          EMPLOYEE DOING ITEMS 1 AND 2 ON THE HANDOUT ENTITLED "USING A SIMPLE
  416.          DATABASE FOR PERSONNEL"--THIS SHEET WILL BE REFERRED TO AS EMPLOYEE
  417.          HANDOUT.
  418.  
  419.    II.  UPDATING RECORDS
  420.  
  421.         A.  Load dBASE III PLUS as per steps in session one
  422.  
  423.  
  424.         B.  .USE <database file> - to open a database file
  425.  
  426.             1.  From Set Up Menu select "Database File"
  427.  
  428.             2.  Choose drive containing database file
  429.  
  430.             3.  Select database file from submenu given
  431.  
  432.             4.  Type {N} in answer to "Is the File Indexed"
  433.  
  434.  
  435.         C.  Commands to add, view and edit records from Update Menu Option
  436.  
  437.             1.  .APPEND
  438.  
  439.                 add new records to end of database file
  440.                 review and edit previous files by pressing {PGUP}
  441.  
  442.             2.  .EDIT
  443.  
  444.                 edit or look at records, one at a time
  445.                 first record in database file is displayed on entry screen
  446.                 to scan records press {PGDN} and {PGUP}
  447.                 importance of accurate data entry--Garbage In/Garbage Out
  448.  
  449.             3.  .DISPLAY
  450.  
  451.                 displays one to 15 records at a time
  452.                 default scope = current record; where pointer is
  453.                 scope = which records will be evaluated, in this case displayed
  454.                 pointer = a number used by dBASE to identify the current record
  455.  
  456.             4.  .BROWSE
  457.  
  458.                 up to 17 records at a time may be displayed on the screen
  459.                 in browse you can edit, append or display records
  460.                 to pan (move off-screen information into view) press {CTRL} and
  461.                   leave it down while pressing the right arrow key
  462.  
  463.  
  464. ACTION:  ADD RECORDS USING BROWSE (EMPLOYEE HANDOUT ITEMS 3 AND 4).
  465.  
  466.         C.  Position Pointer
  467.  
  468.             1.  Pointer points to current record
  469.  
  470.             2.  .GOTO TOP
  471.  
  472.                 Positions pointer at the first record
  473.                 From Position Menu
  474.                     Select "Goto record"
  475.                     Select "Top"
  476.  
  477.         D.  Commands to mark records for deletion and delete them from a data-
  478.             base using the Update Menu Option
  479.  
  480.             1.  .DELETE
  481.  
  482.                 Marks a record for deletion
  483.                 From Update Menu
  484.                     Select Edit or Browse
  485.                     Move cursor to desired record
  486.                     Press {CTRL}-{U} to mark record
  487.                     Press {CTRL}-{END} to save change made and exit
  488.                       Edit or Browse
  489.                     Press {ESC} to not save changes made
  490.  
  491.  
  492.             2.  .RECALL
  493.  
  494.                 Unmarks all records previously marked for deletion
  495.                 From Update Menu select "Recall"
  496.  
  497.             3.  .PACK
  498.  
  499.                 Takes a record completely out of a database
  500.                 From Update Menu select "Pack"
  501.                 Saves disk space but have no indication the record was once in
  502.                   the database file
  503.                 Always check records marked for deletion before packing
  504.  
  505.  
  506. ACTION:  DELETE, RECALL AND PACK RECORDS (EMPLOYEE HANDOUT ITEMS 5 AND 6).
  507.  
  508.  
  509.   III.  RETRIEVING INFORMATION USING DISPLAY
  510.  
  511.         A.  Get into the Retrieve Menu
  512.  
  513.         B.  Select "Display"
  514.  
  515.             1.  Select "Specify scope"
  516.  
  517.             2.  From submenu select "Next" and press {ENTER}
  518.  
  519.             3.  Type number of records to display and then {ENTER}
  520.  
  521.             4.  Select "Construct a field list"
  522.  
  523.             5.  From submenu choose fields you want to display
  524.  
  525.             6.  Select "Build a search condition"
  526.  
  527.             7.  From submenu select field you want to search
  528.  
  529.             8.  From menu of what are called relational operators select
  530.                 desired option -- relational operators are for relating either
  531.                 characters, numbers or date expressions and include <, >, =.
  532.                 <>, <= and >=.
  533.  
  534. ACTION:  DISPLAY RECORDS (EMPLOYEE ITEM #7)
  535.  
  536.  
  537. COMMENT:  Selecting "Build a scope condition" is more advanced and will not be
  538.           covered now.
  539.  
  540.  
  541.       IV.  REPORTS
  542.  
  543.         A.  Types of Reports that Can Be Generated
  544.  
  545.             1.  Include in discussion reports pertinent to what students will
  546.                 be using
  547.  
  548.             2.  If possible, get actual reports
  549.  
  550.         B.  .REPORT FORM <filename> - Creating a Report-Format File
  551.  
  552.             1.  Select appropriate database without an index file
  553.  
  554.             2.  Open the Create Menu and select "Report"
  555.  
  556.             3.  Select drive to store report file
  557.  
  558.             4.  Enter Page Title
  559.                 Press {ENTER} to enter Title options
  560.                 Type up to a four line title
  561.  
  562.             5.  Make other changes to Options Menu as needed
  563.                 Position cursor on option that you want to change
  564.                 Press {ENTER} to enter the option
  565.                 Type in changes as needed
  566.                 Press the right arrow key to leave the Options Menu
  567.  
  568.         C.  Column Layout
  569.  
  570.             1.  Select "Contents" from the Columns Menu
  571.  
  572.             2.  Press {F10} to see a listing of fields for deciding which
  573.                 fields to select
  574.  
  575.             3.  Select "Contents" and enter the field
  576.  
  577.             4.  Select "Heading" and go to line 3 to enter first line of a
  578.                 two-line heading and then press {ENTER}
  579.  
  580.             5.  Select "Width" and change column width if needed
  581.  
  582.             6.  On the next line type the second line of the heading and then
  583.                 press {ENTER}
  584.  
  585.             7.  Press {PGDN} to move to next column
  586.  
  587.             8.  Repeat steps 3 to 6 for each column you want to have printed
  588.                 on your report
  589.  
  590.             9.  Save report-format file by entering the Exit Menu and selecting
  591.                 "Save"
  592.  
  593.  
  594.         D.  .REPORT FORM <filename> TO PRINT - To print report
  595.  
  596.             1.  Select desired database (without index file) in Set Up Menu
  597.  
  598.             2.  From Retrieve Menu select "Report"
  599.  
  600.             3.  Choose "Execute the command"
  601.  
  602.  
  603.     V.  CHANGING THE ORDER OF YOUR DATA
  604.  
  605.         A.  Sorting
  606.  
  607.             1.  Creates a new database file sorted in the way you specify
  608.  
  609.             2.  Must use the new file if you want information the way you
  610.                 sorted it
  611.  
  612.             3.  .SORT ON <desired field> TO <new database filename>
  613.  
  614.                 use menu prompts under Organize Menu to choose
  615.                   sort commands
  616.                 example .SORT ON LASTNAME TO EMP_LAST
  617.  
  618.                 NOTICE DOT COMMAND PROMPTS BEING AUTOMATICALLY PRINTED BY
  619.                 dBASE III ON THE BOTTOM OF THE SCREEN WHEN YOU SELECT
  620.                 DIFFERENT OPTIONS FROM THE ORGANIZE MENU
  621.  
  622.             4.  Uses lots of disk space and after new records are added a new
  623.                 file must be made to keep the order correct
  624.  
  625.             5.  To use a sorted file in the Set Up menu select the sorted
  626.                 database filename.
  627.  
  628.             6.  Difference between viewing and changing data (viewing, sorting,
  629.                 editing, etc.)
  630.  
  631.  
  632. ACTION:  CREATE AND USE A SORTED FILE (EMPLOYEE HANDOUT ITEM 9).
  633.  
  634.  
  635.         B.  Indexing
  636.  
  637.             1.  Creates a small file that tells dBASE III PLUS the order to
  638.                 LIST records relates back to main database file and can be
  639.                 updated automatically when records are added to the database
  640.                 files
  641.  
  642.             2.  .INDEX ON <desired field> TO <index filename>
  643.  
  644.                 use menu prompts under Organize Menu to choose
  645.                   index commands
  646.                 example .INDEX ON LNAME+FNAME TO EMPL_LAST
  647.  
  648.                 NOTICE DOT COMMAND PROMPTS BEING AUTOMATICALLY PRINTED BY
  649.                 dBASE III ON THE BOTTOM OF THE SCREEN WHEN YOU SELECT
  650.                 DIFFERENT OPTIONS FROM THE ORGANIZE MENU
  651.  
  652.             3.  Using an Index File
  653.  
  654.                 In the Set Up Menu select "Database file"
  655.                 Select the appropriate drive and answer {Y} to the prompt "Is
  656.                   the file indexed?"
  657.                 Select appropriate index file
  658.                 Press the right arrow key to exit the submenu
  659.                 When records are listed they are listed in order of the index
  660.                   file
  661.  
  662. ACTION:  CREATE AND USE AN INDEXED FILE (EMPLOYEE HANDOUT ITEM 10).
  663.  
  664.  
  665.    VI.  REVIEW
  666.  
  667.         A.  Update Menu - Briefly review the options
  668.  
  669.         B.  Organize Menu - Briefly review Index and Sort
  670.  
  671. ==============================================================================
  672.  
  673.  
  674.  
  675.                  INTRODUCTION TO dBASE III PLUS
  676.                         --SESSION THREE--
  677.  
  678.                    Instructor:  Barbara Slyker
  679.  
  680.  
  681. ------------------------------------------------------------------------------
  682.  
  683. SESSION THREE OBJECTIVES:
  684.  
  685. Students after completing session three should be able to:
  686.  
  687.         1.  Use dot prompts to give commands to dBASE III
  688.  
  689.         2.  Recognize a few of the most common file extensions and their
  690.             use
  691.  
  692.         3.  Use the Tools Menu to set drive, copy files, get a directory,
  693.             rename a file, erase a file and list structure
  694.  
  695.         4.  Use a customized data entry screen
  696.  
  697.  
  698.  
  699. ------------------------------------------------------------------------------
  700.  
  701.         INSTRUCTOR OUTLINE AND COMMENTS FOR SESSION THREE
  702.  
  703.  
  704.     I.  REVIEW
  705.  
  706.    II.  DOT COMMANDS
  707.  
  708.         A.  Getting to dot prompt from Assist
  709.  
  710.             1.  Press {ESC} from the Assistant main menu
  711.             2.  The dot prompt "." will appear followed by cursor
  712.             3.  Cursor = flashing rectangle on screen that is indicates where
  713.                 information will be entered on the screen
  714.             4.  Status bar on bottom of screen displays current operation or
  715.                 command, current drive, file in use, and other information
  716.                 depending on commands being used.
  717.  
  718.         B.  Don't worry about memorizing all commands!!!  Don't have to!
  719.  
  720.             1.  Help can be used as you go along to learn the commands
  721.  
  722. ACTION:  PRESS {F1} OR TYPE HELP AT THE DOT PROMPT.  LOOK AT MENUS AVAILABLE IN
  723.          HELP.  GIVE STUDENTS TIME TO EXPLORE.
  724.  
  725.             2.  Using help is easiest because it is always there and can't
  726.                 be misplaced but an alternatives include
  727.  
  728.                 dBASE III PLUS Quick Reference Guide
  729.                 Summary of dBASE III Commands as found in Que Corporations
  730.                   dBASE III Handbook
  731.                 dBASE III PLUS Manual--Learning and Using dBASE III PLUS,
  732.                   chapter on commands (Chapter 5 of Using dBASE III PLUS)
  733.  
  734. COMMENT:  These review some of the commands already used in previous session
  735.           but use the dot prompt instead of the assist menus.  Each of these
  736.           commands need not be presented in discussion, depending upon the
  737.           group.  Most of them are self-explanatory and students can try them
  738.           using a database already created.
  739.  
  740. ACTION:  CHANGE BACK AND FORTH FROM ASSIST MENUS TO THE DOT PROMPT.
  741.  
  742.  
  743.         C.  Syntax of dot commands
  744.  
  745.             1.  Syntax = way command is structured (Example:  in English
  746.                 sentences are formed in certain ways; in dBASE, commands are
  747.                 written following certain "rules"
  748.  
  749.             2.  .VERB [<scope>] [<expression list>] [FOR <condition>]
  750.                 .DISPLAY  ALL   LASTNAME, SALARY    FOR SALARY > 10
  751.  
  752.                 Scope = which records will be evaluated
  753.  
  754.                         RECORD <n> - one selected record
  755.                         NEXT <n>   - next so many <n> records selected
  756.                         REST       - beginning with current record to end
  757.                         ALL        - all records selected
  758.  
  759.                 Expression list = in our case a list of field names
  760.  
  761.                 FOR condition = to display specific records meeting a particu-
  762.                                 lar requirement
  763.  
  764.         D.  Examples of dot commands
  765.  
  766.             1.  .SET DEFAULT TO B:      -  makes drive b the drive where files
  767.                                            are stored
  768.  
  769.             2.  .USE <FILE NAME>        -  opens a database file
  770.  
  771.             3.  .HELP                   -  opens help menus
  772.  
  773.             4.  .APPEND                 -  adds a data record to end of a data-
  774.                                            base file
  775.  
  776.             5.  .LIST                   -  shows contents of records of
  777.                                            database file
  778.  
  779.             6.  .DISPLAY                -  shows current record
  780.  
  781.             7.  .DISPLAY ALL OFF        -  shows all records without record
  782.                                            numbers being displayed
  783.  
  784.             8.  .DISPLAY ALL <FIELD NAME>, <FIELD NAME> -  displays field con-
  785.                   tents of current record of the database file in use
  786.  
  787.             9.  .DISPLAY ALL FOR <FIELD NAME> = '<character string>'  -
  788.                   displays all records that contain the word enclosed by
  789.                   apostrophes; example = .DISPLAY ALL FOR LASTNAME = 'SMITH'
  790.                   assuming there is a field name spelled "LASTNAME"
  791.  
  792.            10.  .DISPLAY FOR <FIELD NAME> > <number> - displays first record
  793.                   that that has number greater than indicated in the field
  794.                   name chosen
  795.  
  796.            11.  .DISPLAY STRUCTURE      -  displays data structure of active
  797.                                            database file
  798.  
  799.            12.  .DISPLAY FILES LIKE *.* -  displays all files on current drive
  800.  
  801.            13.  .DISPLAY FILES          -  displays all database files
  802.  
  803.            14.  .GO TOP                 -  positions record pointer at to top
  804.                                            (first) record
  805.  
  806.            15.  .INDEX ON <FIELD NAME> TO <INDEX FILENAME> -  creates an index
  807.                   file that allows database to be displayed in a certain order
  808.  
  809.            16.  .EDIT 2                 -  displays record 2 for editing
  810.  
  811.            17.  .BROWSE <FIELD NAME>,<FIELD NAME>  -  shows up to 17 records at
  812.                   once from active database file to look at or change
  813.  
  814.            18.  .DELETE                 -  marks current record for deletion
  815.  
  816.            19.  .RECALL                 -  unmarks all records that were pre-
  817.                                            viously marked for deletion
  818.  
  819.            20.  .PACK                   -  removes all records marked for
  820.                                            deletion from the database
  821.  
  822.            21.  .CREATE <DATABASE FILENAME>  -  creates a new database file
  823.  
  824.            22.  .COPY TO <FILENAME>     -  makes a backup copy of the active
  825.                                            database file
  826.  
  827. ACTION:  USE ONE OF THE DATABASE FILES ALREADY CREATED TO EXPERIMENT WITH THESE
  828.          DIFFERENT DOT PROMPT COMMANDS.
  829.  
  830. COMMENT: SEE HANDOUTS "GETTING TO dBASE III PLUS DOT COMMANDS", AND "RETRIEVING
  831.          INFORMATION" INCLUDED IN THIS COURSE OUTLINE.
  832.  
  833.  
  834.   III.  FILE EXTENSIONS
  835.  
  836.         A.  What is a File Extension?
  837.  
  838.             1.  A filename consists of up to 8 characters
  839.  
  840.             2.  A file extension is the period and up to 3 characters that
  841.                 come at the end of a file name
  842.  
  843.                 8.3 format
  844.  
  845.                 example = address.dbf
  846.  
  847.         B.  Default File Identifier
  848.  
  849.             1.  This is the file extension that dBASE automatically adds to a
  850.                 file you name
  851.  
  852.             2.  Used to help determine the type of file when seeing a directory
  853.                 of filenames, whether it is a database file, a report form
  854.                 file, etc.
  855.  
  856.             3.  You can type in a file identifier if you wish, but then the
  857.                 identifier must be included with the filename whenever you
  858.                 want to use the file--so let dBASE automatically add the
  859.                 file extension
  860.  
  861.         C.  Some of the dBASE File Extensions
  862.  
  863.             1.  .dbf = database file
  864.             2.  .dbt = database memo files
  865.             3.  .frm = report form files
  866.             4.  .ndx = index file
  867.  
  868.  
  869.    IV.  USING TOOLS FROM THE ASSIST MENUS
  870.  
  871.         A.  .SET DEFAULT TO <drive:>
  872.  
  873.             1.  Can change default drive by using this option
  874.  
  875.             2.  Can also set a drive in the Set Up Menu when opening a
  876.                 database file
  877.  
  878.             3.  Select "Set drive"
  879.  
  880.             4.  Select disk drive to make current
  881.  
  882.  
  883.         B.  .COPY FILE <source filename> TO <target filename>
  884.  
  885.             1.  Copies any file to a new file--makes a backup
  886.  
  887. COMMENT:  In the Organize Menu selecting copy copies only the open database
  888.           file to another file.
  889.  
  890.             2.  Select "Copy File" in the Tools Menu
  891.  
  892.             3.  Select disk drive to find the source file
  893.  
  894.             4.  Select the existing (source) file
  895.  
  896.             5.  Select drive to store new file
  897.  
  898.             6.  Enter name of the new file
  899.  
  900.  
  901.         C.  .DIR
  902.  
  903.             1.  Displays contents of a disk directory
  904.  
  905.             2.  Select "Directory" in the Tools Menu
  906.  
  907.             3.  Select disk drive to find the files
  908.  
  909.             4.  Select file type that you wanted displayed--database,
  910.                 index, etc. (see file extensions below)
  911.  
  912.         D.  .RENAME <old filename> TO <new filename>
  913.  
  914.             1.  Renames a file - extension must be included
  915.  
  916.             2.  Select "Rename" in the Tools Menu
  917.  
  918.             3.  Select name of file to rename
  919.  
  920.             4.  Enter new filename
  921.  
  922.         E.  .ERASE <filename>
  923.  
  924.             1.  Deletes a file from the disk - file extensions must be included
  925.  
  926.             2.  Select "Erase" from the Tools Menu
  927.  
  928.             3.  Select disk drive that contains the file
  929.  
  930.             4.  Type the name of the file and press {ENTER}
  931.  
  932.             5.  NO SECOND CHANCE IS GIVEN SO BE CAREFUL!!!
  933.  
  934.             6.  Press {ESC} before completing step four above if you don't want
  935.                 to erase the file
  936.  
  937.         F.  .LIST STRUCTURE
  938.  
  939.             1.  Displays the structure of an open database file
  940.  
  941.             2.  Select "List structure" from the Tools Menu
  942.  
  943.             3.  Answer {N} or {Y} to indicate no, do not direct the output to
  944.                 the printer or yes, direct output to printer
  945.  
  946.     V.  SUMMARIZING DATA
  947.  
  948.         A.  .SUM
  949.  
  950.             1.  From Retrieve Menu Select "Sum"
  951.  
  952.             2.  Select "Construct a field list"
  953.  
  954.             3.  Select numeric field to be added
  955.  
  956.             4.  If desired, build a search condition and/or scope as explained
  957.                 in Session Two under Retrieving Information Using Display
  958.  
  959.             5.  Select "Execute the Command"
  960.  
  961.         B.  .AVERAGE
  962.  
  963.             1.  From Retrieve Menu Select "Average"
  964.  
  965.             2.  Follow steps 2 to 5 as in "Sum" above
  966.  
  967.         C.  .COUNT - counts how many records match a certain condition
  968.  
  969.             1.  From Retrieve Menu Select "Count"
  970.  
  971.             2.  Follow steps 2 to 5 as in "Sum" above except that fields don't
  972.                 have to be numeric
  973.  
  974. ACTION:  WITH APPROPRIATE DATABASE FILE HAVE STUDENTS EXPERIMENT WITH SUM,
  975.          AVERAGE AND COUNT
  976.  
  977.  
  978.    VI.  USING CUSTOMIZED DATA ENTRY SCREENS
  979.  
  980. COMMENT:  SESSION THREE MAY BE TOO LONG--THIS COULD BE PRESENTED IN SESSION
  981.           FOUR
  982.  
  983.         A.  What is a Data Entry Screen?
  984.  
  985.             1.  When a database is created dBASE sets up a form starting from
  986.                 the upper left corner of screen with each field name starting
  987.                 on the left column
  988.  
  989.             2.  The default format may be changed by creating a screen format
  990.                 with more descriptive prompts replacing field names
  991.  
  992.             3.  Position of fields on screen may be changed to make a more
  993.                 interesting display
  994.  
  995.  
  996.         B.  .SET FORMAT TO <filename> - to use a customized format while
  997.             entering data
  998.  
  999.             1.  When starting to use a database the screen format will be the
  1000.                 default that dBASE creates (with one field name per line
  1001.                 starting at left corner) unless a custom format you create is
  1002.                 selected
  1003.  
  1004.             2.  To select custom format file
  1005.  
  1006.                 Highlight the Set Up Menu
  1007.  
  1008.                 Select "Format for Screen"
  1009.  
  1010.                 Choose drive containing format file
  1011.  
  1012.                 Select name of format file from submenu given
  1013.  
  1014.  
  1015. ACTION:  HAVE SAMPLE FILE ON STUDENTS DISK SO THEY CAN SELECT A CUSTOM FORMAT
  1016.          FILE TO USE WHILE EDITING A DATABASE
  1017.  
  1018.  
  1019.   VII.  REVIEW
  1020.  
  1021. ==============================================================================
  1022.  
  1023.                       EXTRAS DEPENDING ON THE GROUP
  1024.  
  1025.     I.  CREATING AND PRINTING LABELS
  1026.  
  1027. COMMENT:  DEPENDING UPON THE GROUP, CREATING A LABEL FILE CAN BE SKIPPED WITH
  1028.           STUDENTS JUST PRINTING LABELS--A SAMPLE LABEL FILE (EXTENSION .LBL)
  1029.           COULD BE SAVED ONTO STUDENTS' DISKS WITH A CORRESPONDING DATABASE SO
  1030.           THAT STUDENTS COULD PRINT THE LABELS WITHOUT HAVING TO CREATE THEM.
  1031.  
  1032.  
  1033.         A.  Creating a Label File
  1034.  
  1035.             1.  Select appropriate database file and index file that includes
  1036.                 enough information to make a label
  1037.  
  1038.             2.  Open the Create Menu and select "Label"
  1039.  
  1040.             3.  Select drive to store label file
  1041.  
  1042.             4.  Enter name of label file
  1043.  
  1044.             5.  Select size of labels and change other label characteristics
  1045.                 as needed
  1046.  
  1047.         B.  Label Contents
  1048.  
  1049.             1.  Open Contents Menu and move to line 2
  1050.  
  1051.             2.  Press {F10} to see field submenu
  1052.  
  1053.             3.  Select field with first name in it
  1054.  
  1055.             4.  Enter a comma
  1056.  
  1057.             5.  Press {F10} again and select field with the last name in it
  1058.  
  1059.             6.  Press {ENTER} to leave second line of label
  1060.  
  1061.             7.  Put the address field on line 3 and press {ENTER}
  1062.  
  1063.             8.  Put the city, state, and zip field on line 4 ending with the
  1064.                 following:
  1065.  
  1066.                 CITY,"   "STATE,"   ",ZIP
  1067.  
  1068.             9.  Open Edit Menu and select "Save"
  1069.  
  1070.         C.  Printing Labels
  1071.  
  1072.             1.  Select desired database and index file in Set Up Menu
  1073.  
  1074.             2.  From Retrieve Menu select "Label"
  1075.  
  1076.             3.  Choose "Execute the command"
  1077.  
  1078.  
  1079. ACTION:  CREATE LABELS WITH AN EXISTING DATABASE AND PRINT IF PRINTER IS
  1080.          AVAILABLE
  1081.  
  1082.  
  1083.    II.  .CREATE SCREEN <filename>
  1084.  
  1085. COMMENT:  REFER TO USING CUSTOMIZED DATA ENTRY SCREENS IN SESSION THREE.
  1086.  
  1087.  
  1088.         A.  Getting Started
  1089.  
  1090.             1.  Open the Create Menu
  1091.  
  1092.             2.  Select "Format"
  1093.  
  1094.             3.  Enter the name of the form you're creating; could have part of
  1095.                 database file name in the format file name so it could be
  1096.                 recognized later
  1097.  
  1098.             4.  Select the desired database file from the file list given
  1099.  
  1100.             5.  Choose "Load Selected Files"
  1101.  
  1102.             6.  Mark the desired fields by pressing {ENTER}
  1103.  
  1104.             7.  MOve to the next menu by pressing the left or right arrow
  1105.  
  1106.         B.  Getting into the blackboard
  1107.  
  1108.             1.  Press {F10} to access the Screen Painter Menu
  1109.  
  1110.             2.  Press {ENTER} at the beginning of a line while in Insert mode
  1111.                 to enter blank lines
  1112.  
  1113.             3.  Type over old filed name in Overwrite mode and Insert mode as
  1114.                 needed
  1115.  
  1116.                 field names can be changed to be more informative for data
  1117.                 entry
  1118.  
  1119.                 the field names are only changed in the entry screen; they are
  1120.                 not changed in the database structure
  1121.  
  1122.             4.  Moving fields
  1123.  
  1124.                 Place the cursor at the beginning of the highlight of the field
  1125.                 you want to move and press {ENTER}
  1126.  
  1127.                 Place the cursor where you want field to be located and press
  1128.                 {ENTER}
  1129.  
  1130.                 Retype the label in the new location and delete the old label
  1131.                 using the {DEL} key
  1132.  
  1133.             5.  Putting boxes around fields
  1134.  
  1135.                 Insert one space before each line that starts on column 1 so
  1136.                 there is room to make a box; otherwise, any letter in column 1
  1137.                 will be hidden
  1138.  
  1139.                 Press {F10} to return to the Assist Menus
  1140.  
  1141.                 Open the Options Menu
  1142.  
  1143.                 Select "Draw a Window"
  1144.  
  1145.                 Place cursor in upper left corner of the box you want to make
  1146.                 and press {ENTER}  (be sure the box will be in a blank position
  1147.                 without any characters)
  1148.  
  1149.                 Place cursor in lower right corner of the box and press {ENTER}
  1150.  
  1151.                 If box is too small and has covered data don't panic; put
  1152.                 on any line of the box and press {CTRL}-{U} to delete it
  1153.  
  1154.                 To decrease the size of a box put the cursor on any side or
  1155.                 corner of the box, press {ENTER}, move the cursor to where
  1156.                 you want the box, and press {ENTER} again.
  1157.  
  1158.             6.  Saving the format
  1159.  
  1160.                 Press {F10} to return to Assist Menus
  1161.  
  1162.                 Open the Exit Menu
  1163.  
  1164.                 Select "Save"
  1165.  
  1166.  
  1167. ACTION:  MAKE A CUSTOMIZED DATA ENTRY FORM
  1168.  
  1169.   III.  USING THE MODIFY MENU
  1170.  
  1171.         A.  Use Screen Prompts and Help Facility
  1172.  
  1173.         B.  Modify Database Structure
  1174.  
  1175.         C.  Modify Report Forms
  1176.  
  1177.  
  1178.  
  1179.  
  1180.              HAPPY COMPUTING WITH dBASE III PLUS!!!
  1181.  
  1182.                          Barbara Slyker
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.