STOR 'F' to sixmonth
STOR 'T' to fmonth
SET format to screen
ERAS
DO saytoday
STOR 1 to line
STOR 1 to column
SET intensity on
@ line,column say 'APPOINTMENT CALENDAR'
STOR line+1 to line
SET intensity off
@ line,column say today
SET intensity on
?
STOR line+2 to line
STOR 7 to hour
DO WHIL hour<13
IF hour<10
STOR str(hour,1)+':00' to time
@ line,column+1 say time
STOR line+1 to line
@ line,column+2 say ':30'
ELSE
STOR str(hour,2)+':00' to time
@ line,column say time
STOR line+1 to line
@ line,column+2 say ':30'
ENDI
STOR hour+1 to hour
STOR line+1 to line
ENDD
STOR 4 to line
STOR 26 to column
STOR 1 to hour
DO WHIL hour<7
STOR str(hour,1)+':00' to time
@ line,column say time
STOR line+1 to line
@ line,column+1 say ':30'
STOR line+1 to line
STOR hour+1 to hour
ENDD
STOR 17 to line
@ line,0 say '--------------------------------------------------'
STOR 3 to xpos
STOR 3 to column
STOR 0 to offset
DO saymonth
SET intensity off
STOR line+1 to line
@ line,0 say 'Enter one of the following single letter commands:'
SET intensity on
STOR line+1 to line
@ line,0 say 'A)dd  E)dit  F)uture  N)ext  P)ast  R)eturn  Q)uit'
@ line,60 say 'C)hange lower month'
SET intensity off
USE aggendas index aggendas
DO printime
STOR 'T' to select
DO WHIL select='T'
@ 21,0
@ 19,79
WAIT to command
DO CASE
CASE !(command)='A'
@ 21,0
SET intensity off
GOTO bottom
APPE BLAN
REPL appt:date with date()
@ 21,0 say "Appointment time ==>";
get appt:time picture 'XXXXX'
@ 21,30 say "Appointment description ==>";
get appt:desc picture 'XXXXXXXXXXXXXXXXXX'
READ
DO printime
CASE !(command)='R'
GOTO top
SET date to &holddate
DO erastime
DO printime
CASE !(command)='E'
SET intensity on
GOTO top
BROW
PACK
DO aggendas
CASE !(command)='F' .or. !(command)='P'
GOTO top
@ 21,0
IF !(command)='F'
STOR '        ' to future
@ 21,0 say 'Enter future date as MM/DD/YY';
get future picture 'XX/XX/XX'
READ
ELSE
@ 21,0 say 'Enter previous date as MM/DD/YY';
get future picture 'XX/XX/XX'
READ
ENDI
SET date to &future
DO erastime
DO printime
CASE !(command)='N'
GOTO top
DO nextdate
DO erastime
DO printime
CASE !(command)='Q'
SET date to &holddate
STOR 'F' to select
CASE !(command)='C'
STOR '     ' to change
@ 21,0
@ 21,0 say 'Enter month and year as MM/YY';
get change picture 'XX/XX'
READ
STOR $(change,1,2) to month
STOR $(change,4,2) to year
STOR 10 to row
STOR 57 to column
DO WHIL row<=18
@ row,column
STOR row+1 to row
ENDD
STOR 9 to offset
STOR 0 to column
SET intensity on
DO saymonth
SET intensity off
ENDC
ENDD
SET date to &holddate
RETU
