home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug107.arc / REFERENC.LBR / MAIN.RQF / MAIN.REF
Text File  |  1979-12-31  |  6KB  |  206 lines

  1. * DATE 04/24/85  19:35
  2. * main command program of database
  3. STOR CHR(PEEK(063)) TO dr
  4. REST from rdata additive
  5. USE &dr.:&base
  6. SET INDEX TO &dr.:&tindex
  7. STOR t TO first
  8. * set up the loop
  9. DO WHIL t
  10. * if first time this trip
  11.  IF first
  12.   ERAS
  13.   STOR '<A>dd, <B>ackward, <D>elete/Recall, <E>dit, <F>orward, <H>elp,' TO prompt1
  14.   STOR '<M>aintainence, <P>rint, <R>eports, <S>earch  or <Q>uit ' TO prompt2
  15.   STOR 'Main Database Menu' TO mode
  16.   @ 0,65 SAY "Code: "
  17.   @ 1, 0 SAY "+-------------------------------------------------"
  18.   @ 1,50 SAY "-----------------------------+"
  19.   @ 2, 2 SAY "Author:"
  20.   @ 3,54 SAY ">>> ACTION >>>>>"
  21.   @ 4, 1 SAY "Title 1:"
  22.   @ 6, 1 SAY "Title 2:"
  23.   @ 7, 0 SAY "JrnlCite:"
  24.   @ 9, 0 SAY "Ed-Trans:"
  25.   @ 9,56 SAY "Edn:"
  26.   @ 10, 0 SAY "Pub data:"
  27.   @ 10,55 SAY "Pg #:"
  28.   @ 11, 0 SAY "Lib data:"
  29.   @ 13, 3 SAY "Chron:"
  30.   @ 13,55 SAY "Type:"
  31.   @ 14, 0 SAY "Wks disc:"
  32.   @ 16, 0 SAY "Comments:"
  33.   @ 18,52 SAY "Updated:"
  34.   @ 19, 0 SAY "+-------------------------------------------------"
  35.   @ 19,50 SAY "-----------------------------+"
  36.   @ 20, 2 SAY prompt1
  37.   @ 21, 2 SAY prompt2
  38.  ENDI first
  39.  STOR f TO first
  40.  STOR '?' TO command
  41. * find out if the current record is marked for deletion
  42.  IF *
  43.   STOR 'Deleted' TO deleted
  44.  ELSE
  45.   STOR '       ' TO deleted
  46.  ENDI *
  47. * show the current record, and find out what to do next
  48.  @ 0,27 SAY mode
  49.  @ 0,72 SAY code
  50.  @ 0, 0 SAY deleted
  51.  @ 2,10 SAY author
  52.  @ 3,72 SAY action
  53.  @ 4,10 SAY $(title1,1,60)
  54.  @ 5,10 SAY $(title1,61,60)
  55.  @ 6,10 SAY title2
  56.  @ 7,10 SAY journal
  57.  @ 9,10 SAY edtrans
  58.  @ 9,61 SAY edition
  59.  @ 10,10 SAY publdat
  60.  @ 10,61 SAY pageno
  61.  @ 11,10 SAY librdat
  62.  @ 13,10 SAY chron
  63.  @ 13,61 SAY type
  64.  @ 14,10 SAY $(worksdis,1,60)
  65.  @ 15,10 SAY $(worksdis,61,60)
  66.  @ 16,10 SAY $(comments,1,60)
  67.  @ 17,10 SAY $(comments,60,60)
  68.  @ 18,10 SAY $(comments,121,40)
  69.  @ 18,61 SAY dayu
  70.  @ 22,64 SAY "WHAT NEXT"
  71.  @ 22,76 GET command PICTURE '!'
  72.  READ
  73. * perform selected function
  74.  DO CASE
  75.  CASE command = 'A'
  76.   DO add.ref
  77.  CASE (command = 'B' .OR. command = ',' )
  78. * move backwards one record
  79.   SKIP -1
  80.  CASE command = 'D'
  81. * switch the current record from deleted to recalled
  82.   IF *
  83.    RECA
  84.   ELSE
  85.    DELE
  86.   ENDI *
  87.  CASE command = 'E'
  88.   SET console OFF
  89.   RECA
  90.   STOR # TO rec:number
  91.   SET INDEX TO
  92.   IF rec:number=0
  93.    GO 1
  94.   ELSE
  95.    GO rec:number
  96.   ENDI rec:number=0
  97.   SET console ON
  98.   RELE rec:number
  99.   DO EDIT.ref
  100.  CASE (command = 'F' .OR. command = '.' )
  101. * move forward one record
  102.   SKIP
  103.  CASE (command = 'H' .OR. command = '?' )
  104. * display a screen full of instructions
  105.   STOR t TO first
  106.   ERAS
  107. TEXT
  108.  
  109.  
  110.                   M A I N   M E N U   H E L P   F I L E
  111.  
  112.     Welcome to the SIG/M Reference Manager program.                        
  113.  
  114.     I am here to help you and you can call me anytime by just entering
  115.     a ? mark at any place where this program asks for a command.
  116.  
  117.     When you go back to the screen you will see a line. On top of the      
  118.     line is the information you or someone else put into the data base
  119.     with respect to the reference material.  This information tells   
  120.     you all data you should need with respect to a particular item. 
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                If you press any key I will tell you more.
  128.  
  129.  
  130. ENDT
  131.   SET CONSOLE OFF
  132.   WAIT
  133.   SET CONSOLE ON
  134.   ERAS
  135. TEXT
  136.  
  137.  
  138. The information on screen is clear, so let's look below the line.  This shows
  139. what you can do.  To look at the next record -  hit 'F' (or a period).  To go
  140. back one record - hit 'B' (or a comma). To delete a record hit 'D' and a sign
  141. will appear at the upper right corner.  To remove the delete - hit 'D' again.
  142. Don't worry  -   you cannot accidentally delete a record just by hitting 'D'.  
  143. You must run another program on the Maintenance Menu (purge) to delete.   You
  144. will also find on the Maintenance Menu modules to back up the file, to browse
  145. through it    (although because of the nature of this data base large editing
  146. jobs had best be done in the dBASE program rather than in this program.)
  147.  
  148. To find a file - hit 'S' for search.  To edit an entry hit 'E'  (although you
  149. usually would search for a file - and Edit from the search menu.) To add more
  150. books, just hit 'A' for add. To print the information on the screen - hit 'P'
  151. for Print.  To prepare a report hit 'R' for Reports. You can also display the
  152. records on screen on the report menu.                                      
  153.  
  154.  
  155.  
  156.                       Please hit any key to continue         
  157.  
  158. ENDT
  159.   SET CONSOLE OFF
  160.   WAIT
  161.   SET CONSOLE ON
  162.   ERAS
  163. TEXT
  164.  
  165.                                                                         
  166.                                                                             
  167.                                                                             
  168.                                                                            
  169.                                                    
  170.                                                                          
  171.    -------------------------------------------------------------------------
  172.    WHATEVER YOU DO  -  NEVER SHUT OFF THE MACHINE OR REMOVE A DISK UNTIL YOU 
  173.    FIRST RETURN TO THE MAIN MENU AND THEN QUIT TO THE OPERATING SYSTEM.     
  174.  
  175.    If you ever get a SYNTAX error that just hitting ENTER does not correct, 
  176.    hit the ESCAPE key and type Quit. Then try all over again.
  177.  
  178.    EVERY SO OFTEN YOU WILL FIND YOU WANT TO USE THE ESCAPE KEY AND WHEN YOU
  179.    TRY TO TYPE 'QUIT' NOTHING HAPPENS. AT A FEW POINTS IN THIS PROGRAM SCREEN
  180.    ACCESS HAS BEEN ELIMINATED. THEREFORE, TYPE 'QUIT' EVEN THOUGH IT DOES NOT
  181.    APPEAR ON THE SCREEN - AND UNLESS THE MACHINE IS LOCKED UP - YOU WILL EXIT
  182.    TO THE OPERATING SYSTEM.
  183.    -------------------------------------------------------------------------
  184.  
  185.              Please hit any key to get back to the data base
  186.  
  187. ENDT
  188.   SET CONSOLE OFF
  189.   WAIT
  190.   SET CONSOLE ON
  191.   ERAS
  192.  CASE command = 'P'
  193.   DO PRINT.ref
  194.  CASE command = 'M'
  195.   DO MAINTAIN.ref
  196.  CASE command = 'R'
  197.   DO report.ref
  198.  CASE command = 'Q'
  199.   SET CONSOLE OFF
  200.   QUIT
  201.  CASE command = 'S'
  202.   DO search.ref
  203.  ENDC
  204. * loop back again
  205. ENDD WHILE t
  206.