It is currently Tue Dec 01, 2020 5:37 pm

All times are UTC - 8 hours [ DST ]

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Unit 3 - Lesson 2: Create/Edit Database - Exercise 1
PostPosted: Sun Jul 10, 2011 9:33 am 
User avatar

Joined: Wed Nov 17, 2010 8:37 am
Posts: 136
Real Name: Terry L. Wiechmann
Began Programming in MUMPS: 0- 0-1971
  1. Create the MP1PEDIT routine.
  2. Add the first query.
  3. Have student add the remaining queries.
  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.
    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.

Terry L. Wiechmann

Offline Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created