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 / AGGENDAS.CZD / AGGENDAS.CMD
OS/2 REXX Batch file  |  2000-06-30  |  3KB  |  135 lines

  1. STOR 'F' to sixmonth
  2. STOR 'T' to fmonth
  3. SET format to screen
  4. ERAS
  5. DO saytoday
  6. STOR 1 to line
  7. STOR 1 to column
  8. SET intensity on
  9. @ line,column say 'APPOINTMENT CALENDAR'
  10. STOR line+1 to line
  11. SET intensity off
  12. @ line,column say today
  13. SET intensity on
  14. ?
  15. STOR line+2 to line
  16. STOR 7 to hour
  17. DO WHIL hour<13
  18. IF hour<10
  19. STOR str(hour,1)+':00' to time
  20. @ line,column+1 say time
  21. STOR line+1 to line
  22. @ line,column+2 say ':30'
  23. ELSE
  24. STOR str(hour,2)+':00' to time
  25. @ line,column say time
  26. STOR line+1 to line
  27. @ line,column+2 say ':30'
  28. ENDI
  29. STOR hour+1 to hour
  30. STOR line+1 to line
  31. ENDD
  32. STOR 4 to line
  33. STOR 26 to column
  34. STOR 1 to hour
  35. DO WHIL hour<7
  36. STOR str(hour,1)+':00' to time
  37. @ line,column say time
  38. STOR line+1 to line
  39. @ line,column+1 say ':30'
  40. STOR line+1 to line
  41. STOR hour+1 to hour
  42. ENDD
  43. STOR 17 to line
  44. @ line,0 say '--------------------------------------------------'
  45. STOR 3 to xpos
  46. STOR 3 to column
  47. STOR 0 to offset
  48. DO saymonth
  49. SET intensity off
  50. STOR line+1 to line
  51. @ line,0 say 'Enter one of the following single letter commands:'
  52. SET intensity on
  53. STOR line+1 to line
  54. @ line,0 say 'A)dd  E)dit  F)uture  N)ext  P)ast  R)eturn  Q)uit'
  55. @ line,60 say 'C)hange lower month'
  56. SET intensity off
  57. USE aggendas index aggendas
  58. DO printime
  59. STOR 'T' to select
  60. DO WHIL select='T'
  61. @ 21,0
  62. @ 19,79
  63. WAIT to command
  64. DO CASE
  65. CASE !(command)='A'
  66. @ 21,0
  67. SET intensity off
  68. GOTO bottom
  69. APPE BLAN
  70. REPL appt:date with date()
  71. @ 21,0 say "Appointment time ==>";
  72. get appt:time picture 'XXXXX'
  73. @ 21,30 say "Appointment description ==>";
  74. get appt:desc picture 'XXXXXXXXXXXXXXXXXX'
  75. READ
  76. DO printime
  77. CASE !(command)='R'
  78. GOTO top
  79. SET date to &holddate
  80. DO erastime
  81. DO printime
  82. CASE !(command)='E'
  83. SET intensity on
  84. GOTO top
  85. BROW
  86. PACK
  87. DO aggendas
  88. CASE !(command)='F' .or. !(command)='P'
  89. GOTO top
  90. @ 21,0
  91. IF !(command)='F'
  92. STOR '        ' to future
  93. @ 21,0 say 'Enter future date as MM/DD/YY';
  94. get future picture 'XX/XX/XX'
  95. READ
  96. ELSE
  97. @ 21,0 say 'Enter previous date as MM/DD/YY';
  98. get future picture 'XX/XX/XX'
  99. READ
  100. ENDI
  101. SET date to &future
  102. DO erastime
  103. DO printime
  104. CASE !(command)='N'
  105. GOTO top
  106. DO nextdate
  107. DO erastime
  108. DO printime
  109. CASE !(command)='Q'
  110. SET date to &holddate
  111. STOR 'F' to select
  112. CASE !(command)='C'
  113. STOR '     ' to change
  114. @ 21,0
  115. @ 21,0 say 'Enter month and year as MM/YY';
  116. get change picture 'XX/XX'
  117. READ
  118. STOR $(change,1,2) to month
  119. STOR $(change,4,2) to year
  120. STOR 10 to row
  121. STOR 57 to column
  122. DO WHIL row<=18
  123. @ row,column
  124. STOR row+1 to row
  125. ENDD
  126. STOR 9 to offset
  127. STOR 0 to column
  128. SET intensity on
  129. DO saymonth
  130. SET intensity off
  131. ENDC
  132. ENDD
  133. SET date to &holddate
  134. RETU
  135.