A5CST ;SLC/STAFF-SITE TRACKING SEND UPDATE TO SERVER ;3/15/93 08:53
;;1.0;Site Tracking Update;;Mar 12, 1993
;
PAC(PKG,VER) ; from package init (A5CSTBUL installs code to call this routine)
; Compatable with Fileman Version 18 or greater
; PKG = $T(IXF) of the INIT routine.
; VER is an array that is contained in DIFROM from the INIT routine
;
; This routine is called using the following code in the INIT routine:
; <tab>I DIFROM S X="A5CST" X ^%ZOSF("TEST") D:$T PAC^A5CST($T(IXF),.DIFROM)
; The code preceeds the line containing: =DIFROM G Q^DIFROM
; ** and make sure that you send this routine out with the package **
;
N DATE,DIFROM,DOMAIN,NOW,PACKAGE,RUN,SERVER,SITE,START,XMDUZ,XMSUB,XMTEXT,XMY,Y K ^TMP("A5CSTS",$J)
;
; Site tracking updates only occur if run in a VA production primary domain
; account and having a domain for FORUM
I $G(^XMB("NAME"))'[".DOMAIN.EXT" Q
X ^%ZOSF("UCI") I Y'=^%ZOSF("PROD") Q
I $L($G(^XMB("NAME")),".")>3 Q
S DOMAIN=$O(^DIC(4.2,"B","FORUM")) I DOMAIN'["FORUM." Q
;
S SERVER="S.A5CSTS@"_DOMAIN
S PACKAGE=$P($P(PKG,";",3),U)
S SITE=$G(^XMB("NAME"))
S START=$P($G(^DIC(9.4,VER(0),"PRE")),U,2) I '$L(START) S START="Unknown"
S NOW=$$HTFM^XLFDT($H)
S RUN="Unknown" I START S RUN=$$FMDIFF^XLFDT(NOW,START,3)
S START=$$FMTE^XLFDT(START)
S DATE=NOW\1
S NOW=$$FMTE^XLFDT(NOW)
;
; Message for server
S ^TMP("A5CSTS",$J,1,0)="PACKAGE INSTALL"
S ^TMP("A5CSTS",$J,2,0)="SITE: "_SITE
S ^TMP("A5CSTS",$J,3,0)="PACKAGE: "_PACKAGE
S ^TMP("A5CSTS",$J,4,0)="VERSION: "_VER
S ^TMP("A5CSTS",$J,5,0)="Start time: "_START
S ^TMP("A5CSTS",$J,6,0)="Completion time: "_NOW
S ^TMP("A5CSTS",$J,7,0)="Run time: "_RUN
S ^TMP("A5CSTS",$J,8,0)="DATE: "_DATE
;
; Data is sent to server on ISC-SLC - S.A5CSTS
S XMY(SERVER)="",XMDUZ=.5,XMTEXT="^TMP(""A5CSTS"",$J,",XMSUB=PACKAGE_" VERSION "_VER_" INSTALLATION"
D ^XMD
K ^TMP("A5CSTS",$J)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HA5CST 1939 printed Dec 13, 2024@01:38:37 Page 2
A5CST ;SLC/STAFF-SITE TRACKING SEND UPDATE TO SERVER ;3/15/93 08:53
+1 ;;1.0;Site Tracking Update;;Mar 12, 1993
+2 ;
PAC(PKG,VER) ; from package init (A5CSTBUL installs code to call this routine)
+1 ; Compatable with Fileman Version 18 or greater
+2 ; PKG = $T(IXF) of the INIT routine.
+3 ; VER is an array that is contained in DIFROM from the INIT routine
+4 ;
+5 ; This routine is called using the following code in the INIT routine:
+6 ; <tab>I DIFROM S X="A5CST" X ^%ZOSF("TEST") D:$T PAC^A5CST($T(IXF),.DIFROM)
+7 ; The code preceeds the line containing: =DIFROM G Q^DIFROM
+8 ; ** and make sure that you send this routine out with the package **
+9 ;
+10 NEW DATE,DIFROM,DOMAIN,NOW,PACKAGE,RUN,SERVER,SITE,START,XMDUZ,XMSUB,XMTEXT,XMY,Y
KILL ^TMP("A5CSTS",$JOB)
+11 ;
+12 ; Site tracking updates only occur if run in a VA production primary domain
+13 ; account and having a domain for FORUM
+14 IF $GET(^XMB("NAME"))'[".DOMAIN.EXT"
QUIT
+15 XECUTE ^%ZOSF("UCI")
IF Y'=^%ZOSF("PROD")
QUIT
+16 IF $LENGTH($GET(^XMB("NAME")),".")>3
QUIT
+17 SET DOMAIN=$ORDER(^DIC(4.2,"B","FORUM"))
IF DOMAIN'["FORUM."
QUIT
+18 ;
+19 SET SERVER="S.A5CSTS@"_DOMAIN
+20 SET PACKAGE=$PIECE($PIECE(PKG,";",3),U)
+21 SET SITE=$GET(^XMB("NAME"))
+22 SET START=$PIECE($GET(^DIC(9.4,VER(0),"PRE")),U,2)
IF '$LENGTH(START)
SET START="Unknown"
+23 SET NOW=$$HTFM^XLFDT($HOROLOG)
+24 SET RUN="Unknown"
IF START
SET RUN=$$FMDIFF^XLFDT(NOW,START,3)
+25 SET START=$$FMTE^XLFDT(START)
+26 SET DATE=NOW\1
+27 SET NOW=$$FMTE^XLFDT(NOW)
+28 ;
+29 ; Message for server
+30 SET ^TMP("A5CSTS",$JOB,1,0)="PACKAGE INSTALL"
+31 SET ^TMP("A5CSTS",$JOB,2,0)="SITE: "_SITE
+32 SET ^TMP("A5CSTS",$JOB,3,0)="PACKAGE: "_PACKAGE
+33 SET ^TMP("A5CSTS",$JOB,4,0)="VERSION: "_VER
+34 SET ^TMP("A5CSTS",$JOB,5,0)="Start time: "_START
+35 SET ^TMP("A5CSTS",$JOB,6,0)="Completion time: "_NOW
+36 SET ^TMP("A5CSTS",$JOB,7,0)="Run time: "_RUN
+37 SET ^TMP("A5CSTS",$JOB,8,0)="DATE: "_DATE
+38 ;
+39 ; Data is sent to server on ISC-SLC - S.A5CSTS
+40 SET XMY(SERVER)=""
SET XMDUZ=.5
SET XMTEXT="^TMP(""A5CSTS"",$J,"
SET XMSUB=PACKAGE_" VERSION "_VER_" INSTALLATION"
+41 DO ^XMD
+42 KILL ^TMP("A5CSTS",$JOB)
+43 QUIT