SDWLFULU ;;IOFO BAY PINES/TEH - SAVE/RESTORE UTILITY FOR ENROLLE STATUS;06/12/2002 ; 20 Aug 2002 2:10 PM
;;5.3;scheduling;**525,1015**;AUG 13 1993;Build 21
;
;
;
;
;
;
Q
EN D HD
W !!
S DIR(0)="SA^B:BACKUP;R:RESTORE"
S DIR("A")="(B)ackup or (R)estore " D ^DIR
I X["^" Q
I X["b" D BACKUP
I X["B" D BACKUP
I X["R" D RESTORE
I X["r" D RESTORE
I X="" Q
END K DA,DIE,DIR,DR,SDWLE,SDWLX,X,SDWLEE
Q
BACKUP ;
;CHECK FOR RUN STATUS
S Y=1 I $D(^XTMP("SDWLFULSTAT",$J,"1B")) W !,"This option has already been run." D I Y D RESTART G EN0
.S DIR(0)="Y",DIR("A")="Do you want to re-run all options",DIR("B")="N" D ^DIR
.I X["^" S Y=0 Q
.I X["Y"!(X["y") S Y=1 Q
.S Y=0
I 'Y Q
EN0 K ^XTMP("409.3")
S SDWLX=0 F S SDWLX=$O(^SDWL(409.3,SDWLX)) Q:SDWLX<1 D
.S SDWLE=$G(^SDWL(409.3,SDWLX,0)) Q:SDWLE="" D
..S SDWLEE=$P(SDWLE,U,20)
..S ^XTMP("409.3",SDWLX)=SDWLEE
W !!,"Backup Completed in ^XTMP(""409.3"")"
S ^XTMP("SDWLFULSTAT",$J,"1B")=""
Q
RESTORE ;
;CHECK RUN STATUS
I '$D(^XTMP("SDWLFULSTAT",$J,"1B")) W !,"Must run BACK-UP before RESTORE." Q
I '$D(^XTMP("409.3")) W !,"Nothing to Restore." Q
S SDWLX=0,SDWLCNT=0 F S SDWLX=$O(^XTMP("409.3",SDWLX)) Q:SDWLX<1 D
.S SDWLCNT=SDWLCNT+1
.S SDWLE=$G(^XTMP("409.3",SDWLX))
.S DR="27////^S X=SDWLE",DIE="^SDWL(409.3,",DA=SDWLX D ^DIE
W !!,"Restore Completed" D MESS
K SDWLCNT S ^XTMP("SDWLFULSTAT",$J,"1R")=""
Q
MESS ;
N XMSUB,XMY,XMTEXT,XMDUZ,SDWLMSG,SDWLI,SDWLIN,XQSUB,Y
S XMY("BENBOW.PHYLLIS2@FORUM.VA.GOV")=""
S XMY("DERDERIAN.JOHN@FORUM.VA.GOV")=""
S XMY("HOUTCHENS.THOMAS@FORUM.VA.GOV")=""
S XMY("BROWN.BONNIE@FORUM.VA.GOV")=""
S XMY("KROCHMAL.CHUCK@FORUM.VA.GOV")=""
S XMY("TAPPER.BRIAN@FORUM.VA.GOV")=""
S XMY("LANDRIE.LARRY@FORUM.VA.GOV")=""
S XMY("TOWSON.LINDA@FORUM.VA.GOV")=""
S XMSUB="Patch SD*5.3*525 restored."
S XMTEXT="SDWLMSG(",XMDUZ="POSTMASTER"
S SDWLIN=$$GET1^DIQ(4,DUZ(2)_",",.01,,)
S SDWLMSG(1,0)="A RESTORE has been performed on patch SD*5.3*525 at "_SDWLIN
S Y=DT D DD^%DT
S SDWLMSG(2,0)="At "_Y
S SDWLMSG(3,0)=SDWLCNT_"Records had the EWL Enrollee Status restored to pre-patch values."
S SDWLMSG(4,0)="",SDWLMSG(0)=4
D ^XMD
Q
HD W:$D(IOF) @IOF W !,?80-$L("SD WAIT LIST file save/restore utility")\2,"EWL WAIT LIST save/restore utility"
Q
RESTART ;
S DIR(0)="Y",DIR("A")="Are you absolutely sure you want to restart this process"
D ^DIR I X["^" Q
I X["Y"!(X["y") K ^XTMP("SDWLFULSTAT") Q
Q
SDWLFULU ;;IOFO BAY PINES/TEH - SAVE/RESTORE UTILITY FOR ENROLLE STATUS;06/12/2002 ; 20 Aug 2002 2:10 PM
+1 ;;5.3;scheduling;**525,1015**;AUG 13 1993;Build 21
+2 ;
+3 ;
+4 ;
+5 ;
+6 ;
+7 ;
+8 QUIT
EN DO HD
+1 WRITE !!
+2 SET DIR(0)="SA^B:BACKUP;R:RESTORE"
+3 SET DIR("A")="(B)ackup or (R)estore "
DO ^DIR
+4 IF X["^"
QUIT
+5 IF X["b"
DO BACKUP
+6 IF X["B"
DO BACKUP
+7 IF X["R"
DO RESTORE
+8 IF X["r"
DO RESTORE
+9 IF X=""
QUIT
END KILL DA,DIE,DIR,DR,SDWLE,SDWLX,X,SDWLEE
+1 QUIT
BACKUP ;
+1 ;CHECK FOR RUN STATUS
+2 SET Y=1
IF $DATA(^XTMP("SDWLFULSTAT",$JOB,"1B"))
WRITE !,"This option has already been run."
Begin DoDot:1
+3 SET DIR(0)="Y"
SET DIR("A")="Do you want to re-run all options"
SET DIR("B")="N"
DO ^DIR
+4 IF X["^"
SET Y=0
QUIT
+5 IF X["Y"!(X["y")
SET Y=1
QUIT
+6 SET Y=0
End DoDot:1
IF Y
DO RESTART
GOTO EN0
+7 IF 'Y
QUIT
EN0 KILL ^XTMP("409.3")
+1 SET SDWLX=0
FOR
SET SDWLX=$ORDER(^SDWL(409.3,SDWLX))
IF SDWLX<1
QUIT
Begin DoDot:1
+2 SET SDWLE=$GET(^SDWL(409.3,SDWLX,0))
IF SDWLE=""
QUIT
Begin DoDot:2
+3 SET SDWLEE=$PIECE(SDWLE,U,20)
+4 SET ^XTMP("409.3",SDWLX)=SDWLEE
End DoDot:2
End DoDot:1
+5 WRITE !!,"Backup Completed in ^XTMP(""409.3"")"
+6 SET ^XTMP("SDWLFULSTAT",$JOB,"1B")=""
+7 QUIT
RESTORE ;
+1 ;CHECK RUN STATUS
+2 IF '$DATA(^XTMP("SDWLFULSTAT",$JOB,"1B"))
WRITE !,"Must run BACK-UP before RESTORE."
QUIT
+3 IF '$DATA(^XTMP("409.3"))
WRITE !,"Nothing to Restore."
QUIT
+4 SET SDWLX=0
SET SDWLCNT=0
FOR
SET SDWLX=$ORDER(^XTMP("409.3",SDWLX))
IF SDWLX<1
QUIT
Begin DoDot:1
+5 SET SDWLCNT=SDWLCNT+1
+6 SET SDWLE=$GET(^XTMP("409.3",SDWLX))
+7 SET DR="27////^S X=SDWLE"
SET DIE="^SDWL(409.3,"
SET DA=SDWLX
DO ^DIE
End DoDot:1
+8 WRITE !!,"Restore Completed"
DO MESS
+9 KILL SDWLCNT
SET ^XTMP("SDWLFULSTAT",$JOB,"1R")=""
+10 QUIT
MESS ;
+1 NEW XMSUB,XMY,XMTEXT,XMDUZ,SDWLMSG,SDWLI,SDWLIN,XQSUB,Y
+2 SET XMY("BENBOW.PHYLLIS2@FORUM.VA.GOV")=""
+3 SET XMY("DERDERIAN.JOHN@FORUM.VA.GOV")=""
+4 SET XMY("HOUTCHENS.THOMAS@FORUM.VA.GOV")=""
+5 SET XMY("BROWN.BONNIE@FORUM.VA.GOV")=""
+6 SET XMY("KROCHMAL.CHUCK@FORUM.VA.GOV")=""
+7 SET XMY("TAPPER.BRIAN@FORUM.VA.GOV")=""
+8 SET XMY("LANDRIE.LARRY@FORUM.VA.GOV")=""
+9 SET XMY("TOWSON.LINDA@FORUM.VA.GOV")=""
+10 SET XMSUB="Patch SD*5.3*525 restored."
+11 SET XMTEXT="SDWLMSG("
SET XMDUZ="POSTMASTER"
+12 SET SDWLIN=$$GET1^DIQ(4,DUZ(2)_",",.01,,)
+13 SET SDWLMSG(1,0)="A RESTORE has been performed on patch SD*5.3*525 at "_SDWLIN
+14 SET Y=DT
DO DD^%DT
+15 SET SDWLMSG(2,0)="At "_Y
+16 SET SDWLMSG(3,0)=SDWLCNT_"Records had the EWL Enrollee Status restored to pre-patch values."
+17 SET SDWLMSG(4,0)=""
SET SDWLMSG(0)=4
+18 DO ^XMD
+19 QUIT
HD IF $DATA(IOF)
WRITE @IOF
WRITE !,?80-$LENGTH("SD WAIT LIST file save/restore utility")\2,"EWL WAIT LIST save/restore utility"
+1 QUIT
RESTART ;
+1 SET DIR(0)="Y"
SET DIR("A")="Are you absolutely sure you want to restart this process"
+2 DO ^DIR
IF X["^"
QUIT
+3 IF X["Y"!(X["y")
KILL ^XTMP("SDWLFULSTAT")
QUIT
+4 QUIT