AUBKUP ;NIGHTLY BACKUP START-UP [ 08/13/85 3:19 PM ]
;IHS-OKLA CITY AREA OFFICE-LMD
Q:$D(DTOUT)!$D(DFOUT)!$D(DUOUT)!$D(DLOUT) G A1:+Y=1,B1:+Y=2 W !!,"Please use only ""1"" or ""2""." H 3 G MENU
A1 D ^AUCLS W !!,"THIS ROUTINE WILL START THE AUTOMATIC DAILY BACKUP PROCEDURE.....",!!!,"BE SURE TO PUT THE APPROPRIATE TAPE CARTRIDGE",!,"IN THE TAPE DRIVE BEFORE THE SCHEDULED TIME EACH DAY..",!!!
QUE S IOP="Q" D ^%AUQUE Q:'$D(AU("QUE")) K ^%ZTSK(ZTSK),^%ZTSCH(X,ZTSK) S TIME=X
VAR X ^%ZOSF("UCI") S AU("UCI")=$P(Y,",",1),X="MGR" D ^%AUXUCI
S ^SYS(0,"UNATTENDED BACKUP FILE")="OKC;",^SYS(0,"UNATTENDED BACKUP TIME")=TIME,^SYS(0,"UNATTENDED BACKUP RESCHEDULE")="",^SYS(0,"STARTUP","CARETAKER PRINTER")=IO,X=AU("UCI") D ^%AUXUCI K AU Q
B1 W !!!,"......",!!
VAR1 X ^%ZOSF("UCI") S AU("UCI")=$P(Y,",",1),X="MGR" D ^%AUXUCI S ^SYS(0,"UNATTENDED BACKUP FILE")="",^SYS(0,"UNATTENDED BACKUP TIME")="",X=AU("UCI") K ^SYS(0,"UNATTENDED BACKUP RESCHEDULE") D ^%AUXUCI K AU
W "The Unattended Backup Procedure is CANCELED." Q
SBRS K DFOUT,DTOUT,DUOUT,DQOUT,DLOUT R Y:USTO I '$T W *7 R Y:5 G SBRS:Y="." I '$T S (DTOUT,Y)="" Q
S:Y="/.," (DFOUT,Y)="" S:Y="" DLOUT="" S:Y="^" (DUOUT,Y)="" S:Y?1"?".E!(Y["^") (DQOUT,Y)=""
Q
AUBKUP ;NIGHTLY BACKUP START-UP [ 08/13/85 3:19 PM ]
+1 ;IHS-OKLA CITY AREA OFFICE-LMD
DO ^AUCLS
WRITE !!,"UNATTENDED DAILY BACKUP PROCEDURE.....",!!!,"Do you wish to:",!!," 1...START a daily backup schedule.",!!," 2...CANCEL the daily backup procedure",!!," "
DO SBRS
+1 IF $DATA(DTOUT)!$DATA(DFOUT)!$DATA(DUOUT)!$DATA(DLOUT)
QUIT
IF +Y=1
GOTO A1
IF +Y=2
GOTO B1
WRITE !!,"Please use only ""1"" or ""2""."
HANG 3
GOTO MENU
A1 DO ^AUCLS
WRITE !!,"THIS ROUTINE WILL START THE AUTOMATIC DAILY BACKUP PROCEDURE.....",!!!,"BE SURE TO PUT THE APPROPRIATE TAPE CARTRIDGE",!,"IN THE TAPE DRIVE BEFORE THE SCHEDULED TIME EACH DAY..",!!!
QUE SET IOP="Q"
DO ^%AUQUE
IF '$DATA(AU("QUE"))
QUIT
KILL ^%ZTSK(ZTSK),^%ZTSCH(X,ZTSK)
SET TIME=X
VAR XECUTE ^%ZOSF("UCI")
SET AU("UCI")=$PIECE(Y,",",1)
SET X="MGR"
DO ^%AUXUCI
+1 SET ^SYS(0,"UNATTENDED BACKUP FILE")="OKC;"
SET ^SYS(0,"UNATTENDED BACKUP TIME")=TIME
SET ^SYS(0,"UNATTENDED BACKUP RESCHEDULE")=""
SET ^SYS(0,"STARTUP","CARETAKER PRINTER")=IO
SET X=AU("UCI")
DO ^%AUXUCI
KILL AU
QUIT
B1 WRITE !!!,"......",!!
VAR1 XECUTE ^%ZOSF("UCI")
SET AU("UCI")=$PIECE(Y,",",1)
SET X="MGR"
DO ^%AUXUCI
SET ^SYS(0,"UNATTENDED BACKUP FILE")=""
SET ^SYS(0,"UNATTENDED BACKUP TIME")=""
SET X=AU("UCI")
KILL ^SYS(0,"UNATTENDED BACKUP RESCHEDULE")
DO ^%AUXUCI
KILL AU
+1 WRITE "The Unattended Backup Procedure is CANCELED."
QUIT
SBRS KILL DFOUT,DTOUT,DUOUT,DQOUT,DLOUT
READ Y:USTO
IF '$TEST
WRITE *7
READ Y:5
IF Y="."
GOTO SBRS
IF '$TEST
SET (DTOUT,Y)=""
QUIT
+1 IF Y="/.,"
SET (DFOUT,Y)=""
IF Y=""
SET DLOUT=""
IF Y="^"
SET (DUOUT,Y)=""
IF Y?1"?".E!(Y["^")
SET (DQOUT,Y)=""
+2 QUIT