home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / a / dbappt.lbr / APPMOD.CZD / APPMOD.CMD
Encoding:
Text File  |  1993-10-26  |  2.0 KB  |  96 lines

  1. NOTE*apmod.cmd-allows quicksearch & EDIT
  2. SET INDE TO
  3. GO BOTT
  4. STOR # TO max
  5. STOR 1+max TO max
  6. STOR max-1 TO toobig
  7. STOR 1 TO run
  8. SET INDE TO apdate
  9. ERAS
  10. DO WHIL run=1
  11. STOR '  /  ' TO mapdate
  12. STOR "'99/99'" TO pic
  13. @ 1,0 SAY 'Appointments                                    Modify Records'
  14. STOR 'Enter the month/year of the entry to find' TO m1
  15. @ 5,0 SAY 'Hit [RETURN] to EXIT:'
  16. STOR 'apdate' TO FIELD
  17. @ 3,00 SAY m1
  18. @ 3,50 GET mapdate PICTURE &pic
  19. READ
  20. @ 15,0
  21. @ 16,0
  22. @ 20,0
  23. IF mapdate='  /  '
  24. ERAS
  25. STOR 0 TO run
  26. RELE ALL LIKE m*
  27. RELE toobig,pic,FIELD
  28. RELE run
  29. RETU
  30. ELSE
  31. STOR $(mapdate,4,2)+$(mapdate,1,2) TO n
  32. @ 10,00
  33. FIND "&N" $apdate
  34. IF #=0
  35. @ 14,0 SAY chr(7)
  36. @ 15,5 SAY 'There are no entries for '+mapdate
  37. @ 16,0 SAY 'You may try another month...' 
  38. LOOP
  39. ELSE
  40. ERAS
  41. @ 1,0 SAY "--Displaying all entries for "+mapdate+"--" 
  42. @ 2,0
  43. DISP OFF #,apdate,appt WHILE $(apdate,7,2)+$(apdate,1,2)="&N" 
  44. STOR f TO found
  45. DO WHIL .not. found
  46. STOR 0 TO temp
  47. @ 21,10 SAY 'To EDIT one of the above records:' 
  48. @ 22,10 SAY 'Enter the record number at left of the record and hit RETURN.' 
  49. @ 23,10 SAY 'ENTER "0" to search again or EXIT' GET temp PICTURE '9999' 
  50. READ
  51. @ 18,0
  52. @ 19,0
  53. @ 20,0
  54. ENDI
  55. IF temp=0
  56. STOR t TO found
  57. ERAS
  58. LOOP
  59. ENDI
  60. IF temp<>0 .AND. temp>max .OR. temp=max
  61. @ 18,0 SAY chr(7)
  62. @ 18,0 SAY 'The number entered was too large:' 
  63. @ 19,0 SAY 'There are only ' 
  64. @ 19,14 SAY toobig USING '####' 
  65. @ 19,19 SAY 'records in the database: - please try again....' 
  66. STOR 0 TO temp
  67. LOOP
  68. ENDI
  69. IF temp<>0 .AND. temp<max
  70. GO temp
  71. ERAS
  72. STOR t TO found
  73. STOR t TO found
  74. DO WHIL found
  75. @ 1,0 SAY 'Modify Entries' 
  76. @ 10,0 SAY 'Appt. Date ' GET apdate PICTURE '99/99/99' 
  77. @ 12,0 SAY 'Appointment' GET appt
  78. READ
  79. @ 22,10 SAY 'ARE ALL THE CHANGES CORRECT (Y/N) ? (default:Y)' GET found ;
  80. PICTURE '!' 
  81. READ
  82. STOR .not. found TO found
  83. ERAS
  84. ENDD
  85. STOR t TO found
  86. ENDD
  87. ENDI
  88. LOOP
  89. ENDI
  90. ENDI
  91.  
  92. te,1,2)="&N" 
  93. STOR f TO found
  94. DO WHIL .not. found
  95. STOR 0 TO temp
  96. @ 21,10 SAY 'To EDIT one of the above rec