Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: KMPDPOST

KMPDPOST.m

Go to the documentation of this file.
  1. KMPDPOST ;OAK/RAK - CM Tools Post Install ;4/2/04 08:55
  1. ;;3.0;KMPD;;Jan 22, 2009;Build 42
  1. ;
  1. EN ;-entry point
  1. N IEN,IEN1,ERROR,FDA,ZIEN
  1. ; update cp parameters file
  1. S FDA($J,8973,"?+1,",.01)=+$P($$SITE^VASITE,"^")
  1. S FDA($J,8973,"?+1,",.02)=$P($$VERSION^KMPDUTL,"^")
  1. S FDA($J,8973,"?+1,",.03)=$$NOW^XLFDT
  1. S FDA($J,8973,"?+1,",.04)=""
  1. S FDA($J,8973,"?+1,",.05)=""
  1. D UPDATE^DIE("","FDA($J)","ERROR")
  1. ; if error
  1. I $D(ERROR) D MSG^DIALOG("W","",60,10,"ERROR") Q
  1. D MES^XPDUTL(" CM TOOLS CURRENT VERSION field in CP PARAMETERS file has been updated!")
  1. ; check for background job
  1. S IEN=$O(^DIC(19,"B","KMPD BACKGROUND DRIVER",0))
  1. D:'IEN MES^XPDUTL(" KMPD BACKGROUND DRIVER is NOT in the OPTION file!")
  1. ; check for option scheduling entry
  1. S IEN1=$O(^DIC(19.2,"B",IEN,0))
  1. I IEN1 D MES^XPDUTL(" [KMPD BACKGROUND DRIVER] is scheduled in the OPTION SCHEDULING file!")
  1. E D
  1. .K ERROR,FDA,ZIEN
  1. .S FDA($J,19.2,"+1,",.01)=IEN
  1. .S FDA($J,19.2,"+1,",2)="T+1@01:30"
  1. .S FDA($J,19.2,"+1,",6)="1D"
  1. .D UPDATE^DIE("","FDA($J)",.ZIEN,"ERROR")
  1. .; if error
  1. .I $D(ERROR) D MSG^DIALOG("W","",60,10,"ERROR") Q
  1. .D MES^XPDUTL(" [KMPD BACKGROUND DRIVER] has been scheduled to run each day at 1:30am!")
  1. ;
  1. Q