DGVPR1 ;ALB/MLI - DG PRE-INIT (SAVE AND RESTORE QUEUED JOBS) ; 6/25/89@1000
;;5.3;Registration;**1015**;Aug 13, 1993;Build 21
;
SAV(LIST) ; -- save queued values
W !!,">>> Saving times for queued jobs...will be restored in post-init to original",!?4,"values..",!
F DGI=1:1 S O=$P($T(@LIST+DGI),";;",2) Q:O="$END" S DGEDIT=0 D OCC
Q
;
OCC S X=$E("'"_O_"'......................................",1,35) W !?4,X S ON=$O(^DIC(19,"B",$E(O,1,30),0)) D OC I 'DGER S DGX=^DIC(19,+ON,200) D OCW
K O,ON,I Q
OC S DGER=0 I '$D(^DIC(19,+ON,0)) W "No such option on file..." S DGER=1 Q
I '$D(^DIC(19,+ON,200)) W "Not a ""tasked"" job..." S DGER=1 Q
S DGTJ(+ON)=^DIC(19,+ON,200)
Q
;
RES ; -- restore queued jobs invoked from post-init
Q:$O(DGTJ(0))=""
S ON=0 F I1=0:0 S ON=$O(DGTJ(ON)) Q:ON="" S X="'"_$E($P(^DIC(19,+ON,0),"^",1)_"'....................................",1,35) W !?4,X S DGX=DGTJ(ON) D OCW
Q
;
OCW W "Queued to run",?58,": " S Y=$S($P(DGX,"^",1)]"":$P(DGX,"^",1),1:"NOT QUEUED") X ^DD("DD"):Y W $J(Y,20)
W !?39,"Device for Output",?58,": " S Y=$S($P(DGX,"^",2)]"":$P(DGX,"^",2),1:"NONE SELECTED") W $J(Y,20)
W !?39,"Rescheduling Freq.",?58,": " S Y=$S($P(DGX,"^",3)]"":$P(DGX,"^",3),1:"NONE") W $J(Y,20)
Q:'DGEDIT
N DGY S DR="",DGY=$S($D(^DIC(19,ON,200)):^(200),1:"")
I DGX D NOW^%DTC S $P(DGX,"^")=$S((%+.0003)>DGX:"",1:DGX) ; date/time in past then can't set
F I=1:1:4 S $P(DGX,"^",I)=$S($P(DGX,"^",I)]"":$P(DGX,"^",I),$P(DGY,"^",I)="":"",1:"@") I $P(DGX,"^",I)]"" S DR=DR_(200+(I-1))_"///"_$S(I=2:$P($P(DGX,"^",I),";",1),1:$P(DGX,"^",I))_";"
Q:DR']"" S DIE="^DIC(19,",(DA,Y)=ON,DIC(0)="L" D ^DIE K DR,DIE,DIC,DA,Y Q
Q
;
DG ;
;;DG G&L RECALCULATION AUTO
;;DG RUG BACKGROUND JOB
;;DG RUG SEMI ANNUAL - TASKED
;;DG PTF BACKGROUND JOB
;;DGJ IRT UPDATE (Background)
;;$END
SD ;
;;SDAM BACKGROUND JOB
;;$END
DGVPR1 ;ALB/MLI - DG PRE-INIT (SAVE AND RESTORE QUEUED JOBS) ; 6/25/89@1000
+1 ;;5.3;Registration;**1015**;Aug 13, 1993;Build 21
+2 ;
SAV(LIST) ; -- save queued values
+1 WRITE !!,">>> Saving times for queued jobs...will be restored in post-init to original",!?4,"values..",!
+2 FOR DGI=1:1
SET O=$PIECE($TEXT(@LIST+DGI),";;",2)
IF O="$END"
QUIT
SET DGEDIT=0
DO OCC
+3 QUIT
+4 ;
OCC SET X=$EXTRACT("'"_O_"'......................................",1,35)
WRITE !?4,X
SET ON=$ORDER(^DIC(19,"B",$EXTRACT(O,1,30),0))
DO OC
IF 'DGER
SET DGX=^DIC(19,+ON,200)
DO OCW
+1 KILL O,ON,I
QUIT
OC SET DGER=0
IF '$DATA(^DIC(19,+ON,0))
WRITE "No such option on file..."
SET DGER=1
QUIT
+1 IF '$DATA(^DIC(19,+ON,200))
WRITE "Not a ""tasked"" job..."
SET DGER=1
QUIT
+2 SET DGTJ(+ON)=^DIC(19,+ON,200)
+3 QUIT
+4 ;
RES ; -- restore queued jobs invoked from post-init
+1 IF $ORDER(DGTJ(0))=""
QUIT
+2 SET ON=0
FOR I1=0:0
SET ON=$ORDER(DGTJ(ON))
IF ON=""
QUIT
SET X="'"_$EXTRACT($PIECE(^DIC(19,+ON,0),"^",1)_"'....................................",1,35)
WRITE !?4,X
SET DGX=DGTJ(ON)
DO OCW
+3 QUIT
+4 ;
OCW WRITE "Queued to run",?58,": "
SET Y=$SELECT($PIECE(DGX,"^",1)]"":$PIECE(DGX,"^",1),1:"NOT QUEUED")
IF Y
XECUTE ^DD("DD")
WRITE $JUSTIFY(Y,20)
+1 WRITE !?39,"Device for Output",?58,": "
SET Y=$SELECT($PIECE(DGX,"^",2)]"":$PIECE(DGX,"^",2),1:"NONE SELECTED")
WRITE $JUSTIFY(Y,20)
+2 WRITE !?39,"Rescheduling Freq.",?58,": "
SET Y=$SELECT($PIECE(DGX,"^",3)]"":$PIECE(DGX,"^",3),1:"NONE")
WRITE $JUSTIFY(Y,20)
+3 IF 'DGEDIT
QUIT
+4 NEW DGY
SET DR=""
SET DGY=$SELECT($DATA(^DIC(19,ON,200)):^(200),1:"")
+5 ; date/time in past then can't set
IF DGX
DO NOW^%DTC
SET $PIECE(DGX,"^")=$SELECT((%+.0003)>DGX:"",1:DGX)
+6 FOR I=1:1:4
SET $PIECE(DGX,"^",I)=$SELECT($PIECE(DGX,"^",I)]"":$PIECE(DGX,"^",I),$PIECE(DGY,"^",I)="":"",1:"@")
IF $PIECE(DGX,"^",I)]""
SET DR=DR_(200+(I-1))_"///"_$SELECT(I=2:$PIECE($PIECE(DGX,"^",I),";",1),1:$PIECE(DGX,"^",I))_";"
+7 IF DR']""
QUIT
SET DIE="^DIC(19,"
SET (DA,Y)=ON
SET DIC(0)="L"
DO ^DIE
KILL DR,DIE,DIC,DA,Y
QUIT
+8 QUIT
+9 ;
DG ;
+1 ;;DG G&L RECALCULATION AUTO
+2 ;;DG RUG BACKGROUND JOB
+3 ;;DG RUG SEMI ANNUAL - TASKED
+4 ;;DG PTF BACKGROUND JOB
+5 ;;DGJ IRT UPDATE (Background)
+6 ;;$END
SD ;
+1 ;;SDAM BACKGROUND JOB
+2 ;;$END