FSCLMIPX ;SLC/STAFF-NOIS List Manager - Installs Patches ;11/15/97 18:49
;;1.1;NOIS;;Sep 06, 1998
;
ENTRY ; from FSCSTUP
N DAY,DOMAIN,LINE,MESSAGE,NOMSG,NUM,NUM0,NUM1,PATCHNUM,PACKAGE,SEQ,SITENAME,VERSION
K ^TMP("FSC INSTALLS",$J),^TMP("FSC PATCH",$J)
I '$G(FSCDEV) W !
S VALMCNT=0,VALMCAP="",$P(VALMCAP," ",80)=""
I '$D(FSCSTU) Q
S DATE=$G(DATE,DT)
S NOMSG=" No information on tracking"
D
.I FSCSTU="PATCH SITE" D SITE^FSCSTUPI(PATCH,.VALMCNT) Q
.I FSCSTU="PATCH ALL" D ALL^FSCSTUPI(SITE,DATE,.VALMCNT) Q
.I FSCSTU="PATCH PACK" D PACK^FSCSTUPI(SITE,MODULE,.VALMCNT) Q
.I FSCSTU="PATCH SITENOT" D SITENOT^FSCSTUPN(PATCH,.VALMCNT) Q
.I FSCSTU="PATCH ALLNOT" D ALLNOT^FSCSTUPN(SITE,.VALMCNT) Q
.I FSCSTU="PATCH PACKNOT" D PACKNOT^FSCSTUPN(SITE,MODULE,.VALMCNT) Q
.I FSCSTU="PATCH TEST" D TEST^FSCSTUPT(PATCH,.VALMCNT) Q
.I FSCSTU="PATCH TESTSITE" D SITE^FSCSTUPT(SITE,.VALMCNT) Q
.I FSCSTU="PATCH TESTPACK" D PACK^FSCSTUPT(MODULE,.VALMCNT) Q
S ^TMP("FSC INSTALLS",$J)=VALMCNT_U_VALMCNT
I 'VALMCNT S VALMCNT=2,^TMP("FSC INSTALLS",$J,1,0)=" ",^TMP("FSC INSTALLS",$J,2,0)=NOMSG
K ^TMP("FSC PATCH",$J)
Q
;
N HDR
S FSCSTU=$G(FSCSTU)
S HDR="Site Tracking"
I FSCSTU="PATCH SITE" S HDR=HDR_" - Patch "_$P($G(^A1AE(11005,+$G(PATCH),0)),U)_" installed at these sites"
I FSCSTU="PATCH SITENOT" S HDR=HDR_" - Patch "_$P($G(^A1AE(11005,+$G(PATCH),0)),U)_" is NOT installed at these sites"
I FSCSTU="PATCH ALL" S HDR=HDR_" - "_$P($G(^FSC("SITE",+$G(SITE),0)),U)_" patch installs backto "_$$FMTE^XLFDT($G(DATE,DT))
I FSCSTU="PATCH ALLNOT" S HDR=HDR_" - "_$P($G(^FSC("SITE",+$G(SITE),0)),U)_" patches NOT installed"
I FSCSTU="PATCH PACK" S HDR=HDR_" - "_$P($G(^FSC("SITE",+$G(SITE),0)),U)_" patches for "_$P($G(^FSC("MOD",+$G(MODULE),0)),U)
I FSCSTU="PATCH PACKNOT" S HDR=HDR_" - "_$P($G(^FSC("SITE",+$G(SITE),0)),U)_" patches NOT installed for "_$P($G(^FSC("MOD",+$G(MODULE),0)),U)
I FSCSTU="PATCH TEST" S HDR=HDR_" - Test patch "_$P($G(^A1AE(11005,+$G(PATCH),0)),U)_" installed at these sites"
I FSCSTU="PATCH TESTSITE" S HDR=HDR_" - Test patch installs at "_$P($G(^FSC("SITE",+$G(SITE),0)),U)
I FSCSTU="PATCH TESTPACK" S HDR=HDR_" - Test patch installs for "_$P($G(^FSC("MOD",+$G(MODULE),0)),U)
S VALMHDR(1)=HDR
Q
;
VERINST(PACKAGE,DOMAIN) ; $$(package,domain) -> current version#
N APP,SITENUM
S DOMAIN=$P($G(^DIC(4.2,+DOMAIN,0)),U)
I '$L(DOMAIN) Q ""
S SITENUM=$O(^NTS(2050,"AE",DOMAIN,0))
I 'SITENUM Q ""
S APP=+$O(^DIC(120102,"AP",PACKAGE,0))
I 'APP Q ""
Q $P($G(^NTS(2050,SITENUM,8,APP,0)),U,7)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCLMIPX 2614 printed Oct 16, 2024@18:18:44 Page 2
FSCLMIPX ;SLC/STAFF-NOIS List Manager - Installs Patches ;11/15/97 18:49
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
ENTRY ; from FSCSTUP
+1 NEW DAY,DOMAIN,LINE,MESSAGE,NOMSG,NUM,NUM0,NUM1,PATCHNUM,PACKAGE,SEQ,SITENAME,VERSION
+2 KILL ^TMP("FSC INSTALLS",$JOB),^TMP("FSC PATCH",$JOB)
+3 IF '$GET(FSCDEV)
WRITE !
+4 SET VALMCNT=0
SET VALMCAP=""
SET $PIECE(VALMCAP," ",80)=""
+5 IF '$DATA(FSCSTU)
QUIT
+6 SET DATE=$GET(DATE,DT)
+7 SET NOMSG=" No information on tracking"
+8 Begin DoDot:1
+9 IF FSCSTU="PATCH SITE"
DO SITE^FSCSTUPI(PATCH,.VALMCNT)
QUIT
+10 IF FSCSTU="PATCH ALL"
DO ALL^FSCSTUPI(SITE,DATE,.VALMCNT)
QUIT
+11 IF FSCSTU="PATCH PACK"
DO PACK^FSCSTUPI(SITE,MODULE,.VALMCNT)
QUIT
+12 IF FSCSTU="PATCH SITENOT"
DO SITENOT^FSCSTUPN(PATCH,.VALMCNT)
QUIT
+13 IF FSCSTU="PATCH ALLNOT"
DO ALLNOT^FSCSTUPN(SITE,.VALMCNT)
QUIT
+14 IF FSCSTU="PATCH PACKNOT"
DO PACKNOT^FSCSTUPN(SITE,MODULE,.VALMCNT)
QUIT
+15 IF FSCSTU="PATCH TEST"
DO TEST^FSCSTUPT(PATCH,.VALMCNT)
QUIT
+16 IF FSCSTU="PATCH TESTSITE"
DO SITE^FSCSTUPT(SITE,.VALMCNT)
QUIT
+17 IF FSCSTU="PATCH TESTPACK"
DO PACK^FSCSTUPT(MODULE,.VALMCNT)
QUIT
End DoDot:1
+18 SET ^TMP("FSC INSTALLS",$JOB)=VALMCNT_U_VALMCNT
+19 IF 'VALMCNT
SET VALMCNT=2
SET ^TMP("FSC INSTALLS",$JOB,1,0)=" "
SET ^TMP("FSC INSTALLS",$JOB,2,0)=NOMSG
+20 KILL ^TMP("FSC PATCH",$JOB)
+21 QUIT
+22 ;
+1 NEW HDR
+2 SET FSCSTU=$GET(FSCSTU)
+3 SET HDR="Site Tracking"
+4 IF FSCSTU="PATCH SITE"
SET HDR=HDR_" - Patch "_$PIECE($GET(^A1AE(11005,+$GET(PATCH),0)),U)_" installed at these sites"
+5 IF FSCSTU="PATCH SITENOT"
SET HDR=HDR_" - Patch "_$PIECE($GET(^A1AE(11005,+$GET(PATCH),0)),U)_" is NOT installed at these sites"
+6 IF FSCSTU="PATCH ALL"
SET HDR=HDR_" - "_$PIECE($GET(^FSC("SITE",+$GET(SITE),0)),U)_" patch installs backto "_$$FMTE^XLFDT($GET(DATE,DT))
+7 IF FSCSTU="PATCH ALLNOT"
SET HDR=HDR_" - "_$PIECE($GET(^FSC("SITE",+$GET(SITE),0)),U)_" patches NOT installed"
+8 IF FSCSTU="PATCH PACK"
SET HDR=HDR_" - "_$PIECE($GET(^FSC("SITE",+$GET(SITE),0)),U)_" patches for "_$PIECE($GET(^FSC("MOD",+$GET(MODULE),0)),U)
+9 IF FSCSTU="PATCH PACKNOT"
SET HDR=HDR_" - "_$PIECE($GET(^FSC("SITE",+$GET(SITE),0)),U)_" patches NOT installed for "_$PIECE($GET(^FSC("MOD",+$GET(MODULE),0)),U)
+10 IF FSCSTU="PATCH TEST"
SET HDR=HDR_" - Test patch "_$PIECE($GET(^A1AE(11005,+$GET(PATCH),0)),U)_" installed at these sites"
+11 IF FSCSTU="PATCH TESTSITE"
SET HDR=HDR_" - Test patch installs at "_$PIECE($GET(^FSC("SITE",+$GET(SITE),0)),U)
+12 IF FSCSTU="PATCH TESTPACK"
SET HDR=HDR_" - Test patch installs for "_$PIECE($GET(^FSC("MOD",+$GET(MODULE),0)),U)
+13 SET VALMHDR(1)=HDR
+14 QUIT
+15 ;
VERINST(PACKAGE,DOMAIN) ; $$(package,domain) -> current version#
+1 NEW APP,SITENUM
+2 SET DOMAIN=$PIECE($GET(^DIC(4.2,+DOMAIN,0)),U)
+3 IF '$LENGTH(DOMAIN)
QUIT ""
+4 SET SITENUM=$ORDER(^NTS(2050,"AE",DOMAIN,0))
+5 IF 'SITENUM
QUIT ""
+6 SET APP=+$ORDER(^DIC(120102,"AP",PACKAGE,0))
+7 IF 'APP
QUIT ""
+8 QUIT $PIECE($GET(^NTS(2050,SITENUM,8,APP,0)),U,7)