; ENTER MESSAGE INTO YOUR PERSONAL CALENDAR APPOINTMENT BOOK
.; CALMSGGEN.CMD - MAINTAIN CALENDAR FOR USERS
.ENABLE SUBSTITUTION
.ENABLE GLOBAL
.ENABLE QUIET
.SETS UDATE <DATE>
.GOSUB NUMDAT
.SETN NOW UNUMB
.; HERE DO OUR OPERATION - NUMBER "NOW" HAS A DATE NUMBER
.; THIS FILE WILL CREATE TICKLER MESSAGES KEYED BY RANGE
.LOOP0:
.ENABLE ESCAPE
.ASKS SDT ENTER (DD-MMM-YY) THE DATE TO BEGIN SHOWING THIS NOTICE
.IFT <ESCAPE> .SETS SDT <DATE>
.SETS DSH SDT[3:3]
.IF DSH NE "-" .GOTO LOOP0
.SETS DSH SDT[7:7]
.IF DSH NE "-" .GOTO LOOP0
.ENABLE ESCAPE
.ASKS EDT ENTER (DD-MMM-YY) END DATE (OR ESCAPE IF SAME)
.IFT <ESCAPE> .SETS EDT SDT
.SETS UDATE SDT
.GOSUB NUMDAT
.SETN ELN UNUMB
.SETS UDATE EDT
.GOSUB NUMDAT
.SETN EEN UNUMB
.SETN EINT EEN-ELN
.SETN EINT EINT*5
.SETS TY <TIME>
.SETS TYM TY[4:5]
.SETS TYS TY[7:10]
.SETN TTM 'TYM'.*59.
.SETN TTS 'TYS'.
.SETN TTS TTS+TTM
.;USE TIME (MM:SS) TO GENERATE A UNIQUE LABEL
.SETN ELN ELN*20+EINT+TTS
.SETS SELBL "L'ELN'"
.SETS LELBL "X'ELN'"
.SETS TELBL "T'ELN'"
.TESTFILE SY:CALEND.TIK
.IF <FILERR> NE 1 .GOTO CREFIL
.OPENA SY:CALEND.TIK
.GOTO GETMSG
.CREFIL:
.OPEN SY:CALEND.TIK
.DATA .ENABLE SUBSTITUTION
.DATA .ENABLE GLOBAL
.DISABLE SUBSTITUTION
.ENABLE DATA
.GOTO SEXIT
.; NUMDAT - COMPUTE A NUMBER FROM A DATE IN SYMBOL "UDATE".
.; RETURN VALUE IN UNUMB
.NUMDAT:
.SETS UYR UDATE[10:11]
.SETN YR 'UYR'.-80.
.SETN YR YR*32.*12.
.SETS UMMM UDATE[4:6]
.IF UMMM EQ "JAN" .SETN MMM 1
.IF UMMM EQ "FEB" .SETN MMM 2
.IF UMMM EQ "MAR" .SETN MMM 2
.IF UMMM EQ "APR" .SETN MMM 4
.IF UMMM EQ "MAY" .SETN MMM 5
.IF UMMM EQ "JUN" .SETN MMM 6
.IF UMMM EQ "JUL" .SETN MMM 7
.IF UMMM EQ "AUG" .SETN MMM 8.
.IF UMMM EQ "SEP" .SETN MMM 9.
.IF UMMM EQ "OCT" .SETN MMM 10.
.IF UMMM EQ "NOV" .SETN MMM 11.
.IF UMMM EQ "DEC" .SETN MMM 12.
.IF UMMM EQ "jan" .SETN MMM 1
.IF UMMM EQ "feb" .SETN MMM 2
.IF UMMM EQ "mar" .SETN MMM 3
.IF UMMM EQ "apr" .SETN MMM 4
.IF UMMM EQ "may" .SETN MMM 5
.IF UMMM EQ "jun" .SETN MMM 6
.IF UMMM EQ "jul" .SETN MMM 7
.IF UMMM EQ "aug" .SETN MMM 8.
.IF UMMM EQ "sep" .SETN MMM 9.
.IF UMMM EQ "oct" .SETN MMM 10.
.IF UMMM EQ "nov" .SETN MMM 11.
.IF UMMM EQ "dec" .SETN MMM 12.
.SETN MMM MMM*32.
.SETS UDD UDATE[1:2]
.SETN DD 'UDD'.-1
.SETN UNUMB YR+MMM+DD
.RETURN
.SEXIT:
.DISABLE DATA
.DATA .DISABLE QUIET
.DATA .;++++++++$$$$$$
.ENABLE SUBSTITUTION
.GETMSG:
.DATA .;@@@@@@'SDT'#'EDT'
.ENABLE DATA
.IF $NOW EQ 1 .GOTO 'LELBL'
.SETS UDATE "'SDT'"
.GOSUB NUMDAT
.IF $NOW LT UNUMB .GOTO 'SELBL'
.SETS UDATE "'EDT'"
.GOSUB NUMDAT
.IF $NOW GT UNUMB .GOTO 'SELBL'
.GOTO 'TELBL'
.'LELBL':
; MESSAGE DUE BETWEEN 'SDT' AND 'EDT'
.'TELBL':
.DISABLE DATA
.; GET THE DATA
.ASK CMDX IS THIS A COMMAND FILE
.SETS CMPR ";"
.IFT CMDX .SETS CMPR ""
.DATA .DISABLE QUIET
.DISABLE QUIET
; ENTER YOUR MESSAGE (C.R. ALONE ON LAST LINE)
.LOOP2:
.ASKS MTXT TEXT
.IF MTXT EQ "" .GOTO LPE2
.DATA 'CMPR''MTXT'
.GOTO LOOP2
.LPE2:
.DATA .'SELBL':
.DATA .;\\\\\\'SDT'\'EDT'
.CLOSE
.GOTO EXIT
.; NUMDAT - COMPUTE A NUMBER FROM A DATE IN SYMBOL "UDATE".
.; RETURN VALUE IN UNUMB
.NUMDAT:
.SETS UYR UDATE[10:11]
.SETN YR 'UYR'.-80.
.SETN YR YR*32.*12.
.SETS UMMM UDATE[4:6]
.IF UMMM EQ "JAN" .SETN MMM 1
.IF UMMM EQ "FEB" .SETN MMM 2
.IF UMMM EQ "MAR" .SETN MMM 2
.IF UMMM EQ "APR" .SETN MMM 4
.IF UMMM EQ "MAY" .SETN MMM 5
.IF UMMM EQ "JUN" .SETN MMM 6
.IF UMMM EQ "JUL" .SETN MMM 7
.IF UMMM EQ "AUG" .SETN MMM 8.
.IF UMMM EQ "SEP" .SETN MMM 9.
.IF UMMM EQ "OCT" .SETN MMM 10.
.IF UMMM EQ "NOV" .SETN MMM 11.
.IF UMMM EQ "DEC" .SETN MMM 12.
.SETN MMM MMM*32.
.SETS UDD UDATE[1:2]
.SETN DD 'UDD'.-1
.SETN UNUMB YR+MMM+DD
.RETURN
.EXIT:
