home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / DATABASE / KPHANDYP.LBR / REMINDER.CZD / REMINDER.CMD
OS/2 REXX Batch file  |  2000-06-30  |  3KB  |  159 lines

  1. ERAS
  2. USE reminder index reminder
  3. STOR date() to hold
  4. STOR $(hold,1,2) to month
  5. STOR $(hold,7,2) to year
  6. STOR ' ' to option
  7. DO saytoday
  8. SET intensity on
  9. @ 1,0 say 'REMINDERS FOR THE MONTH OF'
  10. @ 1,27 say !(title)
  11. SET intensity off
  12. STOR hold to today
  13. SET intensity on
  14. @ 18,0 say '--------------------------------------------------------------------------------'
  15. SET intensity off
  16. @ 19,0 say 'Enter one of the following single letter commands:'
  17. SET intensity on
  18. @ 20,0 say 'A)dd  E)dit  F)uture  N)ext  P)ast  Q)uit  R)eturn'
  19. STOR 'T' to reminder
  20. DO WHIL reminder='T'
  21. IF !(option)#'A'
  22. GOTO top
  23. STOR $(today,1,2) to hold
  24. FIND &hold
  25. STOR 3 to row
  26. STOR 0 to col
  27. SET intensity off
  28. DO WHIL $(event:date,1,2)=hold .and. .not. eof
  29. @ row,col say event:date
  30. @ row,col+7 say event:desc
  31. STOR row+1 to row
  32. SKIP
  33. IF row=17 .and. col=0
  34. STOR 3 to row
  35. STOR col+40 to col
  36. ENDI
  37. IF col>40
  38. SET colon off
  39. @ 22,0
  40. @ 22,0 say 'More... press RETURN to continue';
  41. get return
  42. READ       
  43. SET colon on
  44. STOR 3 to row
  45. STOR 0 to col
  46. DO WHIL row<17
  47. @ row,col
  48. STOR row+1 to row
  49. ENDD
  50. STOR 3 to row
  51. ENDI
  52. ENDD
  53. STOR row to call
  54. ENDI
  55. SET intensity off
  56. @ 21,0 say ' '
  57. WAIT to option
  58. DO CASE
  59. CASE !(option)='A'
  60. STOR '                           ' to desc
  61. STOR '  ' to day
  62. @ 22,0
  63. @ 22,0 say 'Event day (DD)';
  64. get day
  65. @ 22,35 say 'Description';
  66. get desc
  67. READ
  68. STOR trim(day) to day
  69. IF len(day)<2
  70. STOR '0'+day to day
  71. ENDI
  72. STOR $(today,1,3)+day to day
  73. IF row<17 .and. col<41
  74. @ row,col say day
  75. @ row,col+7 say desc
  76. STOR row+1 to row
  77. ENDI
  78. GOTO bottom
  79. APPE BLAN
  80. REPL event:date with day,event:desc with desc
  81. @ 22,0
  82. CASE !(option)='E'
  83. GOTO top
  84. FIND &hold
  85. SET intensity on
  86. BROW
  87. PACK
  88. SET date to &today
  89. DO reminder
  90. CASE !(option)='F' .or. !(option)='P'
  91. STOR '  ' to today
  92. @ 22,0
  93. @ 22,0 say 'Please enter month (MM)';
  94. get today
  95. READ
  96. STOR trim(today) to today
  97. IF len(today)=1
  98. STOR '0'+today to today
  99. ENDI
  100. STOR $(today,1,2)+'/01/'+$(holddate,7,2) to today
  101. STOR today to start
  102. SET date to &today
  103. DO saytoday
  104. SET intensity on
  105. @ 1,0
  106. @ 1,0 say 'REMINDERS FOR THE MONTH OF'
  107. @ 1,27 say !(title)
  108. SET intensity off
  109. STOR start to today
  110. STOR 3 to row
  111. DO WHIL row<17
  112. @ row,0
  113. STOR row+1 to row
  114. ENDD
  115. @ 22,0
  116. CASE !(option)='N'
  117. STOR 3 to row
  118. DO WHIL row<17
  119. @ row,0
  120. STOR row+1 to row
  121. ENDD
  122. @ 1,0
  123. DO nextdate
  124. STOR today to start
  125. SET date to &today
  126. DO saytoday
  127. SET intensity on
  128. @ 1,0 say 'REMINDERS FOR THE MONTH OF'
  129. @ 1,27 say !(title)
  130. SET intensity off
  131. STOR start to today
  132. STOR $(today,1,2) to hold
  133. FIND &hold
  134. @ 22,0
  135. CASE !(option)='Q'
  136. STOR 'F' to reminder
  137. CASE !(option)='R'
  138. SET date to &holddate
  139. STOR holddate to hold
  140. STOR 3 to row
  141. DO WHIL row<17
  142. @ row,0
  143. STOR row+1 to row
  144. ENDD
  145. @ 1,0
  146. DO saytoday
  147. SET intensity on
  148. @ 1,0 say 'REMINDERS FOR THE MONTH OF'
  149. @ 1,27 say !(title)
  150. SET intensity off
  151. STOR hold to today
  152. STOR $(today,1,2) to hold
  153. @ 22,0
  154. ENDC
  155. ENDD
  156. SET date to &holddate
  157. RETU
  158.  
  159.