Mumpster
http://mumpster.org/

Unit 3 - Lesson 2: Create/Edit Database - Exercise 1
http://mumpster.org/viewtopic.php?f=29&t=1176
Page 1 of 1

Author:  tlwiechmann [ Sun Jul 10, 2011 9:33 am ]
Post subject:  Unit 3 - Lesson 2: Create/Edit Database - Exercise 1

Goals
  1. Create the MP1PEDIT routine.
  2. Add the first query.
  3. Have student add the remaining queries.
Description
  1. Create a name spaced routine called MP1PEDIT. If the prefix MP1 is OK for your site then use it. Otherwise you will have to change it to your prefix in all routines.
  2. Read the Global Structure section in the Student Guide.
  3. Add code that queries for each data element in the Parts record.
  4. Give each query a label (separate line) using the same name.
  5. Write the prompt out using the Write command.
  6. Read the value into the variable X. (Programming exercises will use single letter variables as scratch or work variables.)
  7. If the user simply hits enter, quit out of the routine.
  8. If not, set the value of X into a variable with the same name as the query.
  9. Do not write the syntax checking code at this point. Just make the code drop through to each query.
  10. The following is an example of the first query for the Part Number.
    Code:
    PNUM ; Part Number
        Write !,"Part Number: "
        Read X
        If X="" Quit
        Set PNUM=X
  11. After the last query PSP (ignore PUNAM for the time being – it requires special treatment) loop back and query for the next record.
  12. Test this shell and make sure it works. To stop execution, simply hit the Control C key.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/