1*48680Sbostic$ ! 2*48680Sbostic$ ! Deal with requests for UUXQT 3*48680Sbostic$ ! 4*48680Sbostic$ set noon 5*48680Sbostic$ set proc/prio=4 6*48680Sbostic$ set prot=w:re/default 7*48680Sbostic$ ! 8*48680Sbostic$ UUXQT_DIR = "e$disk:[eunice.usr.lib.uucp]" 9*48680Sbostic$ UUXQT_EXECUTE_DIR = "e$disk:[eunice.usr.spool.uucp]" 10*48680Sbostic$ UUXQT_QUEUE = "SYS$SPECIAL" 11*48680Sbostic$ UUXQT_RESUBMIT_PERIOD = "TOMORROW" 12*48680Sbostic$ uuxqt:==$'UUXQT_DIR'uuxqt uuxqt 13*48680Sbostic$ ! 14*48680Sbostic$ ! If there is a problem go tell the Boss 15*48680Sbostic$ on error then $ goto error_mail 16*48680Sbostic$ ! 17*48680Sbostic$ ! Delete JOBID file (means JOB running) 18*48680Sbostic$ delete 'UUXQT_DIR'uuxqt.jid;* 19*48680Sbostic$ UUXQT_Command:="" 20*48680Sbostic$ UUXQT_CMD_FILE = F$SEARCH(UUXQT_DIR + "uuxqt.dat;*") 21*48680Sbostic$ open/read/error=NO_COMMAND_FILE cmd_file 'UUXQT_DIR'uuxqt.dat 22*48680Sbostic$ read cmd_file UUXQT_Command /end=EMPTY_COMMAND_FILE 23*48680Sbostic$EMPTY_COMMAND_FILE: 24*48680Sbostic$ close cmd_file 25*48680Sbostic$ ! 26*48680Sbostic$ ! Delete all UUXQT command files 27*48680Sbostic$ UUXQT_CMD_FILES = UUXQT_CMD_FILE - F$PARSE(UUXQT_CMD_FILE,,,"VERSION") + ";*" 28*48680Sbostic$ delete 'UUXQT_CMD_FILES' 29*48680Sbostic$ ! 30*48680Sbostic$ NO_COMMAND_FILE: 31*48680Sbostic$ assign nla0: sys$print ! Keep those log file coming in !!???!! 32*48680Sbostic$ set default 'UUXQT_EXECUTE_DIR' 33*48680Sbostic$ uuxqt 'UUXQT_Command' !Run UUXQT 34*48680Sbostic$ status = $status 35*48680Sbostic$ goto resubmit 36*48680Sbostic 37*48680Sbostic$error_mail: 38*48680Sbostic$ set noon ! Push through regardless... 39*48680Sbostic$ count = 0 40*48680Sbostic$ subject = "" 41*48680Sbostic$mail_error: 42*48680Sbostic$ on error then $ goto mail_error 43*48680Sbostic$ set noon 44*48680Sbostic$ if count .gt. 10 then $ exit %X114 45*48680Sbostic$ status = $STATUS 46*48680Sbostic$ subject = subject + F$LOG("SYS$NODE") 47*48680Sbostic$ subject = subject + "UUXQT error: " + F$STRING(STATUS) 48*48680Sbostic$ subject = subject + " = " 49*48680Sbostic$ subject = subject + F$MESSAGE(STATUS) 50*48680Sbostic$ subject = subject + " " + UUXQT_COMMAND 51*48680Sbostic$ dis_list = UUXQT_DIR + "Disaster.DIS" 52*48680Sbostic$ dis_list = F$PARSE(dis_list) 53*48680Sbostic$ if dis_list .eqs. "" then $ dis_list = "SYSTEM" 54*48680Sbostic$ dis_list = F$SEARCH(dis_list) 55*48680Sbostic$ if dis_list .eqs. "" then $ dis_list = "SYSTEM" 56*48680Sbostic$ if F$LOCATE(".DIS",DIS_LIST) .lt. F$LENGTH(DIS_LIST) then - 57*48680Sbostic $ dis_list = "@" + dis_list 58*48680Sbostic$ MAIL NL: "''DIS_LIST'" /Subject="''subject'" 59*48680Sbostic$ if .not. $status then $ MAIL nl: SYSTEM - 60*48680Sbostic /subject="UUXQT error mailing error ''STATUS' / ''$status'" 61*48680Sbostic$ ! 62*48680Sbostic$resubmit: 63*48680Sbostic$ if status then $ purge sys$login:uuxqt.log/keep=2 64*48680Sbostic$ uuxqt_command = "submit" 65*48680Sbostic$ ! Submit the job again later (Delta = defined above) 66*48680Sbostic$ assign 'UUXQT_DIR'uuxqt.jid sys$output 67*48680Sbostic$ submit 'UUXQT_DIR'uuxqt - 68*48680Sbostic /after="''UUXQT_RESUBMIT_PERIOD'" - 69*48680Sbostic /queue='UUXQT_QUEUE' /keep/NOPRINT 70*48680Sbostic$ status = $status 71*48680Sbostic$ deassign sys$output 72*48680Sbostic$ ! 73*48680Sbostic$ if status then $ exit 74*48680Sbostic$ if count .gt. 3 then $ exit 75*48680Sbostic$ count = count + 1 76*48680Sbostic$ subject = "Requeue Error:" 77*48680Sbostic$ goto mail_error 78*48680Sbostic$ exit 79