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
/
HANDYP10.LBR
/
PLANNING.CZD
/
PLANNING.CMD
Wrap
OS/2 REXX Batch file
|
2000-06-30
|
5KB
|
243 lines
ERAS
USE planning index planning
STOR ' ' to option
STOR ' ' to space
STOR '----------------------------------------------------------------------' to star
STOR 1 to row
SET intensity off
@ 18,26 say 'Enter one of the following single letter commands:'
SET intensity on
@ 19,26 say 'A)dd E)dit F)uture N)ext P)ast R)eturn Q)uit'
STOR date() to today
IF today=holddate
STOR val($(today,4,2)) to blink
ENDI
STOR $(today,1,2) to month
STOR $(today,7,2) to year
STOR month+'/01/'+year to today
STOR 'T' to planning
DO WHIL planning='T'
IF !(option)#'A'
STOR 0 to col
STOR 0 to add
SET date to &today
DO saytoday
DO CASE
CASE factor=1
STOR 15 to col
CASE factor=2
STOR 25 to col
CASE factor=3
STOR 35 to col
CASE factor=4
STOR 45 to col
CASE factor=5
STOR 55 to col
CASE factor=6
STOR 65 to col
CASE factor=0
STOR 75 to col
ENDC
STOR col-10 to add
STOR title+', 19'+year to title
SET intensity off
@ 0,(80-len(title))/2 say title
SET intensity on
@ 1,5 say '-------SUN-------MON-------TUE-------WED-------THU-------FRI-------SAT'
DO CASE
CASE val(month)=2 .and. int(val(year)/4)*4=val(year)
STOR 29 to endday
CASE val(month)=2
STOR 28 to endday
CASE val(month)=9 .or. val(month)=4 .or. val(month)=6 .or. val(month)=11
STOR 30 to endday
otherwise
STOR 31 to endday
ENDC
STOR 1 to day
STOR 3 to row
STOR col-10 to col
DO WHIL day<endday+1
IF day=blink
SET intensity off
@ row,col-1 say chr(27)+chr(66)+chr(50)
ENDI
@ row,col say day
IF day=blink
SET intensity on
@ row,col+1 say chr(27)+chr(67)+chr(50)
ENDI
STOR day+1 to day
STOR col+10 to col
IF col>65
STOR row+3 to row
STOR 5 to col
ENDI
ENDD
ENDI
GOTO top
FIND &month
DO WHIL $(act:date,1,2)=month .and. .not. eof
STOR add to col
STOR 4 to row
STOR 1 to day
STOR $(act:date,4,2) to start
STOR trim(act:desc) to desc
DO WHIL day<val(start)
STOR day+1 to day
STOR col+10 to col
IF col>65
STOR row+3 to row
STOR 5 to col
ENDI
ENDD
SET intensity off
STOR ' ' to line2
IF len(desc)+col>75
STOR $(desc,1,75-col) to line1
STOR line2+$(desc,75-col+1,len(desc)-(75-col)) to line2
ELSE
STOR desc to line1
ENDI
IF $(act:date,7,2)=year
@ row,col say line1
IF row+3<19
@ row+3,add-1 say line2
ENDI
ENDI
SKIP
ENDD
STOR ' ' to option
SET intensity off
@ 22,26 say 'WAITING';
get option
READ
SET intensity on
DO CASE
CASE !(option)='Q'
STOR 'F' to planning
CASE !(option)='A'
STOR ' ' to start
STOR ' ' to length
@ 22,0
SET intensity off
@ 22,6 say 'Starting day of activity (DD)';
get start
@ 22,40 say 'Length of activity in days';
get length
READ
SET intensity on
STOR 10*val(length) to width
STOR $(space,1,width) to desc
@ 22,18
@ 22,0 say 'Activity';
get desc
READ
STOR trim(desc)+' '+$(star,1,width-len(trim(desc))-2)+'>' to desc
STOR add to col
STOR 4 to row
STOR 1 to day
DO WHIL day<val(start)
STOR day+1 to day
STOR col+10 to col
IF col>65
STOR row+3 to row
STOR 5 to col
ENDI
ENDD
SET intensity off
STOR ' ' to line2
IF len(desc)+col>75
STOR $(desc,1,75-col) to line1
STOR line2+$(desc,75-col+1,len(desc)-(75-col)) to line2
ELSE
STOR desc to line1
ENDI
@ row,col say line1
IF row+3<19
@ row+3,add-1 say line2
ENDI
SET intensity on
@ 22,0
IF len(month)<2
STOR '0'+month to month
ENDI
IF len(trim(start))<2
STOR '0'+trim(start) to start
ENDI
STOR $(month,1,2)+'/'+start+'/'+year to start
GOTO bottom
APPE BLAN
REPL act:date with start,act:desc with desc
CASE !(option)='E'
GOTO top
BROW
PACK
STOR month+'/01/'+year to now
SET date to &now
DO planning
CASE !(option)='F' .or. !(option)='P'
STOR ' ' to new
@ 22,0
SET intensity off
@ 22,26 say 'Enter month and year (MM/YY)';
get new picture 'XX/XX'
READ
SET intensity on
STOR trim(new) to new
STOR $(new,1,2) to month
STOR $(new,4,2) to year
STOR month+'/01/'+year to today
@ 22,0
STOR 0 to row
DO WHIL row<17
@ row,0
STOR row+1 to row
ENDD
IF factor=0 .and. endday>29
@ 18,13 say ' '
@ 19,13 say ' '
ENDI
IF $(holddate,1,3)+'01'+$(holddate,6,3)=today
STOR val($(holddate,4,2)) to blink
ELSE
STOR 0 to blink
ENDI
CASE !(option)='N'
DO nextdate
@ 22,0
STOR 0 to row
DO WHIL row<17
@ row,0
STOR row+1 to row
ENDD
IF factor=0 .and. endday>29
@ 18,13 say ' '
@ 19,13 say ' '
ENDI
STOR 0 to blink
CASE !(option)='R'
STOR $(holddate,1,2)+'/01/'+$(holddate,7,2) to today
STOR val($(holddate,4,2)) to blink
@ 22,0
STOR 0 to row
DO WHIL row<17
@ row,0
STOR row+1 to row
ENDD
IF factor=0 .and. endday>29
@ 18,13 say ' '
@ 19,13 say ' '
ENDI
ENDC
ENDD
SET date to &holddate
RETU
ctor=0 .and. endday>29
@ 18,13 say ' '
@ 19,13 say ' '
ENDI
ENDC
ENDD
SET date to &holddate
R