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

XPDCUSTP.m

Go to the documentation of this file.
  1. XPDCUSTP ;SLC/STAFF-SITE TRACKING UPDATE ALL VERSIONS, PROCESS ;7/20/94 15:37 [ 04/02/2003 8:29 AM ]
  1. ;;8.0;KERNEL;**1005,1007**;APR 1, 2003
  1. ;;7.1;Kernel;**22,35**;Oct 25, 1993
  1. ;
  1. ; from XPDCUST
  1. PAC N ANUM,DA,DATE,DIC,DIE,DR,NEWNM,NUM,PACKAGE,VERSION,XMDUZ,XMSUB,XMTEXT,XMY K ^TMP("XPDCUP",$J),^TMP("XPDCUS",$J)
  1. ;
  1. ; LOAD^XPDCUSTL returns ^TMP("XPDCUP",$J, which is used to find the
  1. ; version of packages. The format for package names is:
  1. ; ^TMP("XPDCUP",$J,name) = version # ^ date installed ^ ^ routine names
  1. ; ^TMP("XPDCUP",$J,old name) = ^ ^ ^ routine names ^ name
  1. D LOAD^XPDCUSTL
  1. ;
  1. ; Go thru names in the package file that are used in site tracking
  1. W !!,"Checking application version numbers and install dates.",!
  1. S PACKAGE="" F S PACKAGE=$O(^DIC(9.4,"B",PACKAGE)) Q:PACKAGE="" I $D(^TMP("XPDCUP",$J,PACKAGE)) D
  1. .;
  1. .; If this is an official name and no version number has been assigned,
  1. .; setup the version and date
  1. .I '$L($P(^TMP("XPDCUP",$J,PACKAGE),U,5)),'$L($P(^TMP("XPDCUP",$J,PACKAGE),U)) D Q
  1. ..D VERSION^XPDCUSTU S ^TMP("XPDCUP",$J,PACKAGE)=VERSION_U_DATE
  1. ..W !,PACKAGE," ",VERSION
  1. ..I VERSION,DATE W " ",$E(DATE,4,5),"/",$E(DATE,6,7),"/",$E(DATE,2,3)
  1. .;
  1. .; If this is an old name, setup the version and date for the new name
  1. .; and change the name of the package to the new name.
  1. .I $L($P(^TMP("XPDCUP",$J,PACKAGE),U,5)) D Q
  1. ..S DA=+$O(^DIC(9.4,"B",PACKAGE,0)) I 'DA Q
  1. ..S NEWNM=$P(^TMP("XPDCUP",$J,PACKAGE),U,5)
  1. ..I $D(^DIC(9.4,"B",NEWNM)) Q
  1. ..D VERSION^XPDCUSTU S ^TMP("XPDCUP",$J,NEWNM)=VERSION_U_DATE
  1. ..L +^DIC(9.4,DA,0) S (DIC,DIE)=9.4,DR=".01///"_NEWNM D ^DIE L -^DIC(9.4,DA,0)
  1. ..W !,PACKAGE," changed to ",NEWNM," ",VERSION I VERSION,DATE W " ",$E(DATE,4,5),"/",$E(DATE,6,7),"/",$E(DATE,2,3)
  1. ;
  1. ; Setup mail message for server
  1. S ^TMP("XPDCUS",$J,1,0)="ALL PACKAGE VERSIONS"
  1. S ^TMP("XPDCUS",$J,2,0)="SITE: "_SITE
  1. S ^TMP("XPDCUS",$J,3,0)="PERSON: "_PERSON
  1. S ^TMP("XPDCUS",$J,4,0)="PACKAGES:"
  1. S NUM=4
  1. S PACKAGE="" F S PACKAGE=$O(^TMP("XPDCUP",$J,PACKAGE)) Q:PACKAGE="" D
  1. .I '$L($P(^TMP("XPDCUP",$J,PACKAGE),U,5)) S NUM=NUM+1,^TMP("XPDCUS",$J,NUM,0)=PACKAGE_U_$P(^TMP("XPDCUP",$J,PACKAGE),U,1,3)
  1. S NUM=NUM+1
  1. S ^TMP("XPDCUS",$J,NUM,0)="AUTO INSTRUMENTS: "
  1. ;
  1. ; Send message to server
  1. S XMY(SERVER)="",XMDUZ=.5,XMTEXT="^TMP(""XPDCUS"",$J,",XMSUB="Site Tracking - "_SITE
  1. D ^XMD
  1. W !!,"A message to update site tracking is being sent to ",$P(SERVER,"@",2)
  1. W !,"ALL DONE",!
  1. Q