KMPDPOST ;OAK/RAK - CM Tools Post Install ;4/2/04 08:55
;;3.0;KMPD;;Jan 22, 2009;Build 42
;
EN ;-entry point
N IEN,IEN1,ERROR,FDA,ZIEN
; update cp parameters file
S FDA($J,8973,"?+1,",.01)=+$P($$SITE^VASITE,"^")
S FDA($J,8973,"?+1,",.02)=$P($$VERSION^KMPDUTL,"^")
S FDA($J,8973,"?+1,",.03)=$$NOW^XLFDT
S FDA($J,8973,"?+1,",.04)=""
S FDA($J,8973,"?+1,",.05)=""
D UPDATE^DIE("","FDA($J)","ERROR")
; if error
I $D(ERROR) D MSG^DIALOG("W","",60,10,"ERROR") Q
D MES^XPDUTL(" CM TOOLS CURRENT VERSION field in CP PARAMETERS file has been updated!")
; check for background job
S IEN=$O(^DIC(19,"B","KMPD BACKGROUND DRIVER",0))
D:'IEN MES^XPDUTL(" KMPD BACKGROUND DRIVER is NOT in the OPTION file!")
; check for option scheduling entry
S IEN1=$O(^DIC(19.2,"B",IEN,0))
I IEN1 D MES^XPDUTL(" [KMPD BACKGROUND DRIVER] is scheduled in the OPTION SCHEDULING file!")
E D
.K ERROR,FDA,ZIEN
.S FDA($J,19.2,"+1,",.01)=IEN
.S FDA($J,19.2,"+1,",2)="T+1@01:30"
.S FDA($J,19.2,"+1,",6)="1D"
.D UPDATE^DIE("","FDA($J)",.ZIEN,"ERROR")
.; if error
.I $D(ERROR) D MSG^DIALOG("W","",60,10,"ERROR") Q
.D MES^XPDUTL(" [KMPD BACKGROUND DRIVER] has been scheduled to run each day at 1:30am!")
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HKMPDPOST 1248 printed Dec 13, 2024@01:40:37 Page 2
KMPDPOST ;OAK/RAK - CM Tools Post Install ;4/2/04 08:55
+1 ;;3.0;KMPD;;Jan 22, 2009;Build 42
+2 ;
EN ;-entry point
+1 NEW IEN,IEN1,ERROR,FDA,ZIEN
+2 ; update cp parameters file
+3 SET FDA($JOB,8973,"?+1,",.01)=+$PIECE($$SITE^VASITE,"^")
+4 SET FDA($JOB,8973,"?+1,",.02)=$PIECE($$VERSION^KMPDUTL,"^")
+5 SET FDA($JOB,8973,"?+1,",.03)=$$NOW^XLFDT
+6 SET FDA($JOB,8973,"?+1,",.04)=""
+7 SET FDA($JOB,8973,"?+1,",.05)=""
+8 DO UPDATE^DIE("","FDA($J)","ERROR")
+9 ; if error
+10 IF $DATA(ERROR)
DO MSG^DIALOG("W","",60,10,"ERROR")
QUIT
+11 DO MES^XPDUTL(" CM TOOLS CURRENT VERSION field in CP PARAMETERS file has been updated!")
+12 ; check for background job
+13 SET IEN=$ORDER(^DIC(19,"B","KMPD BACKGROUND DRIVER",0))
+14 if 'IEN
DO MES^XPDUTL(" KMPD BACKGROUND DRIVER is NOT in the OPTION file!")
+15 ; check for option scheduling entry
+16 SET IEN1=$ORDER(^DIC(19.2,"B",IEN,0))
+17 IF IEN1
DO MES^XPDUTL(" [KMPD BACKGROUND DRIVER] is scheduled in the OPTION SCHEDULING file!")
+18 IF '$TEST
Begin DoDot:1
+19 KILL ERROR,FDA,ZIEN
+20 SET FDA($JOB,19.2,"+1,",.01)=IEN
+21 SET FDA($JOB,19.2,"+1,",2)="T+1@01:30"
+22 SET FDA($JOB,19.2,"+1,",6)="1D"
+23 DO UPDATE^DIE("","FDA($J)",.ZIEN,"ERROR")
+24 ; if error
+25 IF $DATA(ERROR)
DO MSG^DIALOG("W","",60,10,"ERROR")
QUIT
+26 DO MES^XPDUTL(" [KMPD BACKGROUND DRIVER] has been scheduled to run each day at 1:30am!")
End DoDot:1
+27 ;
+28 QUIT