.; DR:[333,106]MD.CMD *** MAIL DELIVERY *** .; .; A background task indirect command file which looks at .; appointment calender files in DTC format and sends system .; mail and broadcasts messages to users at the times for .; which appointments are scheduled. .; .; .ENABLE SUBSTITUTION .ENABLE GLOBAL .BEGINN: .; .; Every hour, scan the appointment calender files of each user on the .; system, and if a file exists for that hour, send the sucker mail and .; remind him of the appointment on his screen via Jimmy Downards MAI... .; MAILTSK program if he/she is logged on. Even if he/she is not logged .; on, use a terminal numbers table and broadcast a message to his/her .; terminal telling him/her he/she has an appointment now .; .; Get today's date, and translate the month name into a month number: .SETS TDATE .SETS $YR1 TDATE[10:11] .SETS $MO1 TDATE[4:6] .SETS $DA1 TDATE[1:2] .GOSUB GETMN .;============================================================================= .; Table of users on the system to whom we wanna mail notice of appointments .; and broadcast messages when the appointment is for this hour: .SETS $FIL "DR:[5,1]DTC.DAT" .SETS $USR "MFW" .SETS $TERM "TT7:" .GOSUB LOOKY .SETS $FIL "DR:[333,35]DTC.DAT" .SETS $USR "JMG" .SETS $TERM "TT17:" .GOSUB LOOKY .SETS $FIL "DR:[333,47]DTC.DAT" .SETS $USR "OAL" .SETS $TERM "TT10:" .GOSUB LOOKY .SETS $FIL "DR:[333,106]DTC.DAT" .SETS $USR "MFW" .SETS $TERM "TT7:" .GOSUB LOOKY .SETS $FIL "DR:[333,1]DTC.DAT" .SETS $USR "CJM" .SETS $TERM "TT2:" .GOSUB LOOKY .; .;============================================================================= .; Wait an hour to insure not mailing someone notice of his appointment(s) .; more than once .; .DELAY 60M .; .; .GOTO BEGINN .; .;;;; ^^^^^^^^^^^^^^ commented out to allow this command file to be called .;;;; by the system background command file as a subroutine .;;;; this command file is called once each hour........... .; .GOTO GETOUT .; .; Look in the appointment calender file of the given user. If the .; file is not there, tell the system manager and get out of here. .LOOKY: .CLOSE .OPENR '$FIL' .IF NE 1 .GOSUB OPNERR .IF NE 1 .RETURN .; .; Otherwise, keep on reading appointments, parse for the time: .NEXT1: .READ $APPOI .IFT .RETURN .GOSUB READIT .GOTO NEXT1 .; If the file is empty then get next file, otherwise .; keep reading appointments and comparing times in them to time now .READIT: .SETS YR $APPOI[1:2] .SETS MO $APPOI[3:4] .SETS DA $APPOI[5:6] .SETS HR $APPOI[7:10] .SETS TIM