home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol129 / db2sig / m.lbr / EDIT.SIG < prev    next >
Encoding:
Text File  |  1985-02-10  |  5.4 KB  |  190 lines

  1. * edit.sig 08/18/83
  2. STORE CHR(PEEK (063)) TO dr
  3. STORE # TO rec:number
  4. * for speed - eliminate the index during edit
  5. SET INDEX TO
  6. * why edit a record to be deleted - so bring it back
  7. RECALL
  8. STORE order TO morder
  9. STORE back TO mback
  10. STORE comp TO mcomp
  11. STORE lname TO mlname
  12. STORE fname TO mfname
  13. STORE addr1 TO maddr1
  14. STORE addr2 TO maddr2
  15. STORE addr3 TO maddr3
  16. STORE city TO mcity
  17. STORE state TO mstate
  18. STORE zip TO mzip
  19. STORE vol1 TO mvol1
  20. STORE amt TO mamt
  21. STORE entered TO mentered
  22. STORE shipped TO mshipped
  23. STORE rem1 TO mrem1
  24. STORE rem2 TO mrem2
  25. STORE bo TO mbo
  26. STORE catalog TO mcatalog
  27. STORE bo:ship TO mbo:ship
  28. STORE bo2:ship TO mbo2:ship
  29. STORE dayu TO mdayu
  30. ERASE
  31. STORE 'Edit Order Module' TO mode
  32. STORE 'Enter the new or corrected information' TO prompt1
  33. STORE ' ' TO prompt2
  34. STORE "Control 'Q' to end edit session" TO prompt3
  35. @  1,25 SAY mode
  36. @  2, 0 SAY "+---------------------------------------"
  37. @  2,39 SAY "---------------------------------------+"
  38. @  3, 5 SAY "ORDER NUMBER "
  39. @  3,43 SAY "Complete "
  40. @  3,60 SAY "Backorder "
  41. @  4, 8 SAY "Last name "
  42. @  4,46 SAY "First "
  43. @  5,10 SAY "Address "
  44. @  6, 9 SAY "(line 2) "
  45. @  7, 9 SAY "(line 3) "
  46. @  8,13 SAY "City "
  47. @  8,46 SAY "State "
  48. @  8,65 SAY "ZIP "
  49. @ 10, 2 SAY "Volumes "
  50. @ 12, 3 SAY "Amount "
  51. @ 12,46 SAY "Enter "
  52. @ 12,64 SAY "Ship "
  53. @ 13, 2 SAY "Remarks "
  54. @ 14, 2 SAY "Remarks "
  55. @ 16, 0 SAY "Backorder "
  56. @ 17,44 SAY "Catalog "
  57. @ 18, 2 SAY "Shipped "
  58. @ 18,26 SAY "Shipped "
  59. @ 18,62 SAY "Update "
  60. @ 19, 0 SAY "+---------------------------------------"
  61. @ 19,39 SAY "---------------------------------------+"
  62. @ 20,12 SAY prompt1
  63. @ 21,12 SAY prompt2
  64. @ 22,12 SAY prompt3
  65. @  3,19 GET morder picture '999999999'
  66. @  4,19 GET mlname
  67. @  4,53 GET mfname
  68. @  5,19 GET maddr1
  69. @  6,19 GET maddr2
  70. @  7,19 GET maddr3
  71. @  8,19 GET mcity
  72. @  8,53 GET mstate picture '!!'
  73. @  8,70 GET mzip picture '99999'
  74. @ 10,11 GET mvol1
  75. @ 12,11 GET mamt
  76. @ 12,53 GET mentered picture '99/99/99'
  77. @ 12,70 GET mshipped picture '99/99/99'
  78. @ 13,11 GET mrem1
  79. @ 14,11 GET mrem2
  80. @ 16,11 GET mbo
  81. @ 17,53 GET mcatalog picture '!'
  82. @ 18,11 GET mbo:ship picture '99/99/99'
  83. @ 18,35 GET mbo2:ship picture '99/99/99'
  84. @ 18,70 GET mdayu picture '99/99/99'
  85. @  3,53 GET mcomp picture '!'
  86. @  3,71 GET mback picture '!'
  87. READ
  88. CLEAR GETS
  89. * put your editing routines here
  90. DO CASE
  91.     CASE .NOT. (mcomp = 'Y' .OR. mcomp = 'N')
  92.         STORE t TO error
  93.     CASE .NOT. (mback = 'Y' .OR. mback = 'N')
  94.         STORE t TO error
  95.     CASE .NOT. (mcatalog = 'Y' .OR. mcatalog = 'N' .OR. mcatalog = 'B')
  96.         STORE t TO error
  97.     OTHERWISE
  98.         STORE f TO error
  99. ENDCASE
  100. IF error
  101.     @ 01,00
  102.     @ 20,00
  103.     @ 21,00
  104.     @ 22,00
  105.     @ 1,18 SAY 'Please Correct the Indicated Data'
  106.     STORE t to an:error
  107.     DO WHILE an:error
  108.         DO CASE
  109.             CASE  .NOT. (mcomp = 'Y' .OR. mcomp = 'N')
  110.                 @ 21,15 SAY 'Must answer "Y" or "N" if shipping completed                '
  111.                 @  3,53 GET mcomp picture '!'
  112.                 READ
  113.             CASE  .NOT. (mback = 'Y' .OR. mback = 'N')
  114.                 @ 21,15 SAY 'Must answer "Y" or "N" is shipment backordered              '
  115.                 @ 3,71  GET mback picture '!'
  116.                 READ
  117.             CASE .NOT. (mcatalog = 'Y' .OR. mcatalog = 'N' .OR. mcatalog = 'B')
  118.                 @ 22,15 SAY 'Enter either "Y", "N" or "B" (backorder)'
  119.                 @ 17,53 GET mcatalog picture '!'
  120.                 READ
  121.             OTHERWISE
  122.                 STORE f TO an:error
  123.         ENDCASE
  124.     ENDDO while an:error
  125. ENDIF error
  126. STORE 'N' TO command
  127. @ 20,00
  128. @ 21,00
  129. @ 22,00
  130. @ 21,15 SAY 'Are there any more changes ?                        '
  131. @ 21,48 GET command picture '!'
  132. READ
  133. IF command = 'Y'
  134.     @  3,19 GET morder picture '9999'
  135.     @  4,19 GET mlname
  136.     @  4,53 GET mfname
  137.     @  5,19 GET maddr1
  138.     @  6,19 GET maddr2
  139.     @  7,19 GET maddr3
  140.     @  8,19 GET mcity
  141.     @  8,53 GET mstate picture '!!'
  142.     @  8,70 GET mzip picture '99999'
  143.     @ 10,11 GET mvol1
  144.     @ 12,11 GET mamt
  145.     @ 12,53 GET mentered picture '99/99/99'
  146.     @ 12,70 GET mshipped picture '99/99/99'
  147.     @ 13,11 GET mrem1
  148.     @ 14,11 GET mrem2
  149.     @ 16,11 GET mbo
  150.     @ 17,53 GET mcatalog picture '!'
  151.     @ 18,11 GET mbo:ship picture '99/99/99'
  152.     @ 18,35 GET mbo2:ship picture '99/99/99'
  153.     @ 18,70 GET mdayu picture '99/99/99'
  154.     @  3,53 GET mcomp picture '!'
  155.     @  3,71 GET mback picture '!'
  156.     READ
  157.     CLEAR GETS
  158. ENDIF command = 'Y'
  159. REPLACE order WITH morder, comp WITH mcomp, back WITH mback
  160. REPLACE lname WITH mlname, fname WITH mfname
  161. REPLACE addr1 WITH maddr1, addr2 WITH maddr2, addr3 WITH maddr3
  162. REPLACE city WITH mcity, state WITH mstate, zip WITH mzip
  163. REPLACE vol1 WITH mvol1
  164. REPLACE amt WITH mamt
  165. REPLACE entered WITH mentered
  166. REPLACE shipped WITH mshipped, rem1 WITH mrem1, rem2 WITH mrem2
  167. REPLACE bo WITH mbo, catalog WITH mcatalog, bo:ship WITH mbo:ship
  168. REPLACE bo2:ship WITH mbo2:ship
  169. STORE 'Y' TO command
  170. @ 20,00
  171. @ 21,00
  172. @ 22,00
  173. @ 21,12 SAY 'Do You want to UpDate to Todays Date (Y/N) ?'
  174. @ 21,57 GET command PICTURE '!'
  175. READ
  176. IF command = 'Y'
  177.     REPLACE dayu WITH  DATE()
  178. ELSE
  179.     REPLACE dayu WITH mdayu
  180. ENDIF
  181. @ 23,0 SAY 'Hit RETURN to Continue'
  182. SET CONSOLE OFF
  183. SET INDEX TO &dr.:orders
  184. GOTO rec:number
  185. SET CONSOLE ON
  186. RELEASE ALL
  187. STORE '?' TO command
  188. STORE t TO more
  189. STORE t TO first
  190.