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

XTINITY.m

Go to the documentation of this file.
XTINITY ;ISC-SF.SEA/JLI - SEND INSTALL MESSAGE, SETUP IF ALPHA/BETA TEST SITE ;12/16/93  14:04 ;
VER ;;7.3;TOOLKIT;;Apr 25, 1995
 N DIFROM
 S XQABT5=$H X ^%ZOSF("UCI") I Y'=^%ZOSF("PROD") G KILL
 S X=$T(ADRESS) Q:X=""  S XQADRS=$P(X,";",3) G:XQADRS="" KILL G:XQADRS'["@" KILL
 S X=$T(VERS) S XQVERS=$S(X="":$P($T(VER),";",3),1:X)
 S X=$T(PKGNAM),(X,XQPKG)=$P(X,";",3) G:X="" KILL
 S DIC(0)="MX",DIC="^XMB(1,1,""ABPKG"",",DA(1)=1,D0=1 D ^DIC S XQDA=+Y K DIC
 S Y=$T(ABTEST) I $P(Y,";",3)'["YES" D:XQDA>0 RMVTEST G SENDMESG
 D:XQDA>0 CLROPTS I XQDA'>0 S DA(1)=1,D0=1,DIC(0)="L",DLAYGO=4.3,DIC="^XMB(1,1,""ABPKG"",",DIC("P")=4.332 D ^DIC S XQDA=+Y
 D:XQDA>0 SETOPTS
 ;
SENDMESG ;
 S X=$T(SENMSG) I $P(X,";",3)'="YES" G KILL
 K ^TMP($J,"XQAB") D NOW^%DTC
 S ^TMP($J,"XQAB",1)="INSTALLED V. "_XQVERS_"   "_$E(%,4,5)_"/"_$E(%,6,7)_"/"_$E(%,2,3)_"  "_$E(%_"000",9,10)_":"_$E(%_"00000",11,12)
 S (X1,X2,X3)=0 I $D(XQABT1),$D(XQABT2) S X1=$P(XQABT2,",",2)-$P(XQABT1,",",2)
 I $D(XQABT4),$D(XQABT3) S X2=$P(XQABT4,",",2)-$P(XQABT3,",",2)
 I $D(XQABT4),$D(XQABT5) S X3=$P(XQABT5,",",2)-$P(XQABT4,",",2)
 S:X1'=0 ^TMP($J,"XQAB",2)="  PRE-INIT TIME = "_X1_" SECONDS" S:X2'=0 ^(3)="  INIT TIME = "_X2_" SECONDS" S:X3'=0 ^(4)="  POST-INIT TIME = "_X3_" SECONDS"
 S XMY(XQADRS)="",XMY(DUZ)="",XMDUZ=.5,XMSUB=XQPKG_" "_XQVERS_" INSTALLATION",XMTEXT="^TMP($J,""XQAB""," D ^XMD K ^TMP($J,"XQAB"),XMY,XMDUZ,XMSUB,XMTEXT
 ;
KILL K %,DA,DIC,DIE,DIK,DLAYGO,DR,X,X1,X2,X3,XQ0,XQ1,XQ2,XQ3,XQ4,XQA,XQADRS,XQB,XQBLNK,XQC,XQD1,XQDA,XQI,XQID,XQJ,XQN,XQPKG,XQZ,XQABT1,XQABT2,XQABT3,XQABT4,XQABT5
 Q
 Q
 ;
SETOPTS ;
 S $P(^XMB(1,1,"ABPKG",XQDA,0),U,2,4)=DT_U_XQADRS_U_XQVERS
 F XQI=1:1 S XQA="OPT"_XQI,XQB=$T(@XQA) Q:XQB=""  S X=$P(XQB,";",3),DIC="^XMB(1,1,""ABPKG"",XQDA,1,",DA(1)=XQDA,DA(2)=1,DIC(0)="ML",DLAYGO=4.3,DIC("P")=4.3321 D ^DIC K DIC I Y>0 K XQID(X) D SET1
 S XQID="" F XQI=0:0 S XQID=$O(XQID(XQID)) Q:XQID=""  S DIC="^XMB(1,1,""ABPKG"",XQDA,1,",DIC(0)="M",X=XQID,DA(1)=XQDA,DA(2)=1 K XQID(XQID) D ^DIC I Y>0 S DA=+Y,DIE=DIC,DR=".01///@" D ^DIE
 Q
SET1 ;
 S XQD1=+Y F XQJ=4:1 S X=$P(XQB,";",XQJ) Q:X=""  S DIC="^XMB(1,1,""ABPKG"",XQDA,1,XQD1,1,",DIC(0)="ML",DLAYGO=4.3,DIC("P")=4.33211,DA(3)=1,DA(2)=XQDA,DA(1)=XQD1 D ^DIC K DIC
 Q
 ;
RMVTEST D CLROPTS S DIK="^XMB(1,1,""ABPKG"",",DA(1)=1,DA=XQDA D ^DIK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