FSCSTUPI ;SLC/STAFF-NOIS Site Tracking Update - Patches Installed ;3/4/98 19:46
;;1.1;NOIS;;Sep 06, 1998
;
SITE(PATCH,CNT) ; from FSCLMIPX, FSCRPCG
N DOMAIN,INDATE,LINE,NUM,OTHER,SITENAME,VDATE,ZERO K ^TMP("FSC PATCH",$J)
S CNT=+$G(CNT),OTHER=0
S PATCH=+$G(PATCH) I 'PATCH Q
S VDATE=$P($G(^A1AE(11005,PATCH,0)),U,11)
I 'VDATE S CNT=1 D SETUP(.CNT," This patch has not been verified.")
I VDATE,VDATE<2980101 S CNT=1 D Q
.D SETUP(.CNT,"This patch was released prior to implementation of tracking (1/1/98).")
.D SETUP(.CNT,"No data available.")
S DOMAIN=0 F S DOMAIN=$O(^NTS(2050.2,"APD",PATCH,DOMAIN)) Q:DOMAIN<1 D
.S SITENAME=$P($G(^FSC("SITE",+$O(^FSC("SITE","AE",DOMAIN,0)),0)),U)
.I '$L(SITENAME) S OTHER=1 Q
.S NUM=0 F S NUM=$O(^NTS(2050.2,"APD",PATCH,DOMAIN,NUM)) Q:NUM<1 D
..S ZERO=$G(^NTS(2050.2,NUM,0))
..S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
..S ^TMP("FSC PATCH",$J,SITENAME,NUM)=$$SETSTR^VALM1(INDATE,SITENAME,30,$L(INDATE))
S SITENAME="" F S SITENAME=$O(^TMP("FSC PATCH",$J,SITENAME)) Q:SITENAME="" D
.S NUM="" F S NUM=$O(^TMP("FSC PATCH",$J,SITENAME,NUM),-1) Q:NUM="" S LINE=^(NUM) D
..D SETUP(.CNT,LINE)
I OTHER D
.K ^TMP("FSC PATCH",$J)
.D SETUP(.CNT," ")
.D SETUP(.CNT,"Other domains where this patch is installed:")
.D SETUP(.CNT," ")
.S DOMAIN=0 F S DOMAIN=$O(^NTS(2050.2,"APD",PATCH,DOMAIN)) Q:DOMAIN<1 D
..S SITENAME=$P($G(^FSC("SITE",+$O(^FSC("SITE","AE",DOMAIN,0)),0)),U)
..I $L(SITENAME) Q
..S SITENAME=$P($G(^DIC(4.2,DOMAIN,0)),U) I '$L(SITENAME) Q
..S NUM=0 F S NUM=$O(^NTS(2050.2,"APD",PATCH,DOMAIN,NUM)) Q:NUM<1 D
...S ZERO=$G(^NTS(2050.2,NUM,0))
...S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
...S ^TMP("FSC PATCH",$J,SITENAME,NUM)=$$SETSTR^VALM1(INDATE,SITENAME,30,$L(INDATE))
.S SITENAME="" F S SITENAME=$O(^TMP("FSC PATCH",$J,SITENAME)) Q:SITENAME="" D
..S NUM="" F S NUM=$O(^TMP("FSC PATCH",$J,SITENAME,NUM),-1) Q:NUM="" S LINE=^(NUM) D
...D SETUP(.CNT,LINE)
I 'CNT D SETUP(.CNT," Patch is not installed at any sites.")
D SETUP(.CNT," ")
D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
K ^TMP("FSC PATCH",$J)
Q
;
ALL(SITE,DATE,CNT) ; from FSCLMIPX, FSCRPCG
N DAY,DOMAIN,INDATE,LINE,NUM,PATCH,PATCH0,SUBJECT,ZERO
S CNT=+$G(CNT)
S DATE=+$G(DATE) I 'DATE Q
S DOMAIN=+$P($G(^FSC("SITE",+$G(SITE),0)),U,14) I 'DOMAIN Q
S DAY="" F S DAY=$O(^NTS(2050.2,"ADTP",DOMAIN,DAY),-1) Q:DAY="" Q:DAY<DATE D
.S PATCH=0 F S PATCH=$O(^NTS(2050.2,"ADTP",DOMAIN,DAY,PATCH)) Q:PATCH<1 D
..S PATCH0=$G(^A1AE(11005,PATCH,0)) I '$L(PATCH0) Q
..S SUBJECT=$P(PATCH0,U,5)
..S NUM="" F S NUM=$O(^NTS(2050.2,"ADTP",DOMAIN,DAY,PATCH,NUM),-1) Q:NUM="" D
...S ZERO=$G(^NTS(2050.2,NUM,0))
...S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
...S LINE=$$SETSTR^VALM1($P(PATCH0,U),INDATE,15,$L($P(PATCH0,U)))
...S LINE=$$SETSTR^VALM1(SUBJECT,LINE,30,$L(SUBJECT))
...D SETUP(.CNT,LINE)
I 'CNT D SETUP(.CNT," No patches installed within this date range.")
D SETUP(.CNT," ")
D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
Q
;
PACK(SITE,MODULE,CNT) ; from FSCLMIPX, FSCRPCG
N DOMAIN,INDATE,LINE,NUM,PACKAGE,PATCH,PATCH0,SUBJECT,VERSION,VDATE,ZERO
S CNT=+$G(CNT)
S DOMAIN=+$P($G(^FSC("SITE",+$G(SITE),0)),U,14) I 'DOMAIN Q
S PACKAGE=+$P($G(^FSC("MOD",+$G(MODULE),0)),U,8) I 'PACKAGE Q
S PACKAGE=+$P(^FSC("PACK",PACKAGE,0),U,3) I 'PACKAGE Q
S VERSION=+$P($P(^FSC("MOD",MODULE,0),U),"/",2) I 'VERSION S VERSION=1
S PATCH=0 F S PATCH=$O(^NTS(2050.2,"ADPVP",DOMAIN,PACKAGE,VERSION,PATCH)) Q:PATCH<1 D
.S PATCH0=$G(^A1AE(11005,PATCH,0)) I '$L(PATCH0) Q
.S VDATE=$P(PATCH0,U,11)
.I VDATE,VDATE<2980101 Q
.S SUBJECT=$P(PATCH0,U,5)
.S NUM=0 F S NUM=$O(^NTS(2050.2,"ADPVP",DOMAIN,PACKAGE,VERSION,PATCH,NUM)) Q:NUM<1 D
..S ZERO=$G(^NTS(2050.2,NUM,0))
..S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
..S LINE=$$SETSTR^VALM1(INDATE,$P(PATCH0,U),15,$L(INDATE))
..S LINE=$$SETSTR^VALM1(SUBJECT,LINE,30,$L(SUBJECT))
..D SETUP(.CNT,LINE)
I 'CNT D SETUP(.CNT," No patches installed.")
D SETUP(.CNT," ")
D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
Q
;
INSTALL(PATCH,SITE,CNT) ; from FSCRPCG
N DOMAIN,INDATE,LINE,MSG,NUM,VDATE,ZERO
S CNT=+$G(CNT)
S PATCH=+$G(PATCH) I 'PATCH Q
S VDATE=$P($G(^A1AE(11005,PATCH,0)),U,11)
I 'VDATE S CNT=1 D SETUP(.CNT," This patch has not been verified.")
I VDATE,VDATE<2980101 S CNT=1 D Q
.D SETUP(.CNT,"This patch was released prior to implementation of tracking (1/1/98).")
.D SETUP(.CNT,"No data available.")
S DOMAIN=+$P($G(^FSC("SITE",+$G(SITE),0)),U,14) I 'DOMAIN Q
S NUM=0 F S NUM=$O(^NTS(2050.2,"APD",PATCH,DOMAIN,NUM)) Q:NUM<1 D
.S ZERO=$G(^NTS(2050.2,NUM,0)),MSG=$G(^(1))
.S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
.S LINE=$$SETSTR^VALM1(MSG,INDATE,15,$L(MSG))
.D SETUP(.CNT,LINE)
I 'CNT D SETUP(.CNT," Patch is not installed.")
D SETUP(.CNT," ")
D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
Q
;
SETUP(CNT,LINE) ;
S CNT=CNT+1
I $D(VALMCNT) S ^TMP("FSC INSTALLS",$J,CNT,0)=LINE Q
S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCSTUPI 5274 printed Oct 16, 2024@18:20:49 Page 2
FSCSTUPI ;SLC/STAFF-NOIS Site Tracking Update - Patches Installed ;3/4/98 19:46
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
SITE(PATCH,CNT) ; from FSCLMIPX, FSCRPCG
+1 NEW DOMAIN,INDATE,LINE,NUM,OTHER,SITENAME,VDATE,ZERO
KILL ^TMP("FSC PATCH",$JOB)
+2 SET CNT=+$GET(CNT)
SET OTHER=0
+3 SET PATCH=+$GET(PATCH)
IF 'PATCH
QUIT
+4 SET VDATE=$PIECE($GET(^A1AE(11005,PATCH,0)),U,11)
+5 IF 'VDATE
SET CNT=1
DO SETUP(.CNT," This patch has not been verified.")
+6 IF VDATE
IF VDATE<2980101
SET CNT=1
Begin DoDot:1
+7 DO SETUP(.CNT,"This patch was released prior to implementation of tracking (1/1/98).")
+8 DO SETUP(.CNT,"No data available.")
End DoDot:1
QUIT
+9 SET DOMAIN=0
FOR
SET DOMAIN=$ORDER(^NTS(2050.2,"APD",PATCH,DOMAIN))
if DOMAIN<1
QUIT
Begin DoDot:1
+10 SET SITENAME=$PIECE($GET(^FSC("SITE",+$ORDER(^FSC("SITE","AE",DOMAIN,0)),0)),U)
+11 IF '$LENGTH(SITENAME)
SET OTHER=1
QUIT
+12 SET NUM=0
FOR
SET NUM=$ORDER(^NTS(2050.2,"APD",PATCH,DOMAIN,NUM))
if NUM<1
QUIT
Begin DoDot:2
+13 SET ZERO=$GET(^NTS(2050.2,NUM,0))
+14 SET INDATE=$$FMTE^XLFDT($PIECE(ZERO,U,3))
+15 SET ^TMP("FSC PATCH",$JOB,SITENAME,NUM)=$$SETSTR^VALM1(INDATE,SITENAME,30,$LENGTH(INDATE))
End DoDot:2
End DoDot:1
+16 SET SITENAME=""
FOR
SET SITENAME=$ORDER(^TMP("FSC PATCH",$JOB,SITENAME))
if SITENAME=""
QUIT
Begin DoDot:1
+17 SET NUM=""
FOR
SET NUM=$ORDER(^TMP("FSC PATCH",$JOB,SITENAME,NUM),-1)
if NUM=""
QUIT
SET LINE=^(NUM)
Begin DoDot:2
+18 DO SETUP(.CNT,LINE)
End DoDot:2
End DoDot:1
+19 IF OTHER
Begin DoDot:1
+20 KILL ^TMP("FSC PATCH",$JOB)
+21 DO SETUP(.CNT," ")
+22 DO SETUP(.CNT,"Other domains where this patch is installed:")
+23 DO SETUP(.CNT," ")
+24 SET DOMAIN=0
FOR
SET DOMAIN=$ORDER(^NTS(2050.2,"APD",PATCH,DOMAIN))
if DOMAIN<1
QUIT
Begin DoDot:2
+25 SET SITENAME=$PIECE($GET(^FSC("SITE",+$ORDER(^FSC("SITE","AE",DOMAIN,0)),0)),U)
+26 IF $LENGTH(SITENAME)
QUIT
+27 SET SITENAME=$PIECE($GET(^DIC(4.2,DOMAIN,0)),U)
IF '$LENGTH(SITENAME)
QUIT
+28 SET NUM=0
FOR
SET NUM=$ORDER(^NTS(2050.2,"APD",PATCH,DOMAIN,NUM))
if NUM<1
QUIT
Begin DoDot:3
+29 SET ZERO=$GET(^NTS(2050.2,NUM,0))
+30 SET INDATE=$$FMTE^XLFDT($PIECE(ZERO,U,3))
+31 SET ^TMP("FSC PATCH",$JOB,SITENAME,NUM)=$$SETSTR^VALM1(INDATE,SITENAME,30,$LENGTH(INDATE))
End DoDot:3
End DoDot:2
+32 SET SITENAME=""
FOR
SET SITENAME=$ORDER(^TMP("FSC PATCH",$JOB,SITENAME))
if SITENAME=""
QUIT
Begin DoDot:2
+33 SET NUM=""
FOR
SET NUM=$ORDER(^TMP("FSC PATCH",$JOB,SITENAME,NUM),-1)
if NUM=""
QUIT
SET LINE=^(NUM)
Begin DoDot:3
+34 DO SETUP(.CNT,LINE)
End DoDot:3
End DoDot:2
End DoDot:1
+35 IF 'CNT
DO SETUP(.CNT," Patch is not installed at any sites.")
+36 DO SETUP(.CNT," ")
+37 DO SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
+38 KILL ^TMP("FSC PATCH",$JOB)
+39 QUIT
+40 ;
ALL(SITE,DATE,CNT) ; from FSCLMIPX, FSCRPCG
+1 NEW DAY,DOMAIN,INDATE,LINE,NUM,PATCH,PATCH0,SUBJECT,ZERO
+2 SET CNT=+$GET(CNT)
+3 SET DATE=+$GET(DATE)
IF 'DATE
QUIT
+4 SET DOMAIN=+$PIECE($GET(^FSC("SITE",+$GET(SITE),0)),U,14)
IF 'DOMAIN
QUIT
+5 SET DAY=""
FOR
SET DAY=$ORDER(^NTS(2050.2,"ADTP",DOMAIN,DAY),-1)
if DAY=""
QUIT
if DAY<DATE
QUIT
Begin DoDot:1
+6 SET PATCH=0
FOR
SET PATCH=$ORDER(^NTS(2050.2,"ADTP",DOMAIN,DAY,PATCH))
if PATCH<1
QUIT
Begin DoDot:2
+7 SET PATCH0=$GET(^A1AE(11005,PATCH,0))
IF '$LENGTH(PATCH0)
QUIT
+8 SET SUBJECT=$PIECE(PATCH0,U,5)
+9 SET NUM=""
FOR
SET NUM=$ORDER(^NTS(2050.2,"ADTP",DOMAIN,DAY,PATCH,NUM),-1)
if NUM=""
QUIT
Begin DoDot:3
+10 SET ZERO=$GET(^NTS(2050.2,NUM,0))
+11 SET INDATE=$$FMTE^XLFDT($PIECE(ZERO,U,3))
+12 SET LINE=$$SETSTR^VALM1($PIECE(PATCH0,U),INDATE,15,$LENGTH($PIECE(PATCH0,U)))
+13 SET LINE=$$SETSTR^VALM1(SUBJECT,LINE,30,$LENGTH(SUBJECT))
+14 DO SETUP(.CNT,LINE)
End DoDot:3
End DoDot:2
End DoDot:1
+15 IF 'CNT
DO SETUP(.CNT," No patches installed within this date range.")
+16 DO SETUP(.CNT," ")
+17 DO SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
+18 QUIT
+19 ;
PACK(SITE,MODULE,CNT) ; from FSCLMIPX, FSCRPCG
+1 NEW DOMAIN,INDATE,LINE,NUM,PACKAGE,PATCH,PATCH0,SUBJECT,VERSION,VDATE,ZERO
+2 SET CNT=+$GET(CNT)
+3 SET DOMAIN=+$PIECE($GET(^FSC("SITE",+$GET(SITE),0)),U,14)
IF 'DOMAIN
QUIT
+4 SET PACKAGE=+$PIECE($GET(^FSC("MOD",+$GET(MODULE),0)),U,8)
IF 'PACKAGE
QUIT
+5 SET PACKAGE=+$PIECE(^FSC("PACK",PACKAGE,0),U,3)
IF 'PACKAGE
QUIT
+6 SET VERSION=+$PIECE($PIECE(^FSC("MOD",MODULE,0),U),"/",2)
IF 'VERSION
SET VERSION=1
+7 SET PATCH=0
FOR
SET PATCH=$ORDER(^NTS(2050.2,"ADPVP",DOMAIN,PACKAGE,VERSION,PATCH))
if PATCH<1
QUIT
Begin DoDot:1
+8 SET PATCH0=$GET(^A1AE(11005,PATCH,0))
IF '$LENGTH(PATCH0)
QUIT
+9 SET VDATE=$PIECE(PATCH0,U,11)
+10 IF VDATE
IF VDATE<2980101
QUIT
+11 SET SUBJECT=$PIECE(PATCH0,U,5)
+12 SET NUM=0
FOR
SET NUM=$ORDER(^NTS(2050.2,"ADPVP",DOMAIN,PACKAGE,VERSION,PATCH,NUM))
if NUM<1
QUIT
Begin DoDot:2
+13 SET ZERO=$GET(^NTS(2050.2,NUM,0))
+14 SET INDATE=$$FMTE^XLFDT($PIECE(ZERO,U,3))
+15 SET LINE=$$SETSTR^VALM1(INDATE,$PIECE(PATCH0,U),15,$LENGTH(INDATE))
+16 SET LINE=$$SETSTR^VALM1(SUBJECT,LINE,30,$LENGTH(SUBJECT))
+17 DO SETUP(.CNT,LINE)
End DoDot:2
End DoDot:1
+18 IF 'CNT
DO SETUP(.CNT," No patches installed.")
+19 DO SETUP(.CNT," ")
+20 DO SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
+21 QUIT
+22 ;
INSTALL(PATCH,SITE,CNT) ; from FSCRPCG
+1 NEW DOMAIN,INDATE,LINE,MSG,NUM,VDATE,ZERO
+2 SET CNT=+$GET(CNT)
+3 SET PATCH=+$GET(PATCH)
IF 'PATCH
QUIT
+4 SET VDATE=$PIECE($GET(^A1AE(11005,PATCH,0)),U,11)
+5 IF 'VDATE
SET CNT=1
DO SETUP(.CNT," This patch has not been verified.")
+6 IF VDATE
IF VDATE<2980101
SET CNT=1
Begin DoDot:1
+7 DO SETUP(.CNT,"This patch was released prior to implementation of tracking (1/1/98).")
+8 DO SETUP(.CNT,"No data available.")
End DoDot:1
QUIT
+9 SET DOMAIN=+$PIECE($GET(^FSC("SITE",+$GET(SITE),0)),U,14)
IF 'DOMAIN
QUIT
+10 SET NUM=0
FOR
SET NUM=$ORDER(^NTS(2050.2,"APD",PATCH,DOMAIN,NUM))
if NUM<1
QUIT
Begin DoDot:1
+11 SET ZERO=$GET(^NTS(2050.2,NUM,0))
SET MSG=$GET(^(1))
+12 SET INDATE=$$FMTE^XLFDT($PIECE(ZERO,U,3))
+13 SET LINE=$$SETSTR^VALM1(MSG,INDATE,15,$LENGTH(MSG))
+14 DO SETUP(.CNT,LINE)
End DoDot:1
+15 IF 'CNT
DO SETUP(.CNT," Patch is not installed.")
+16 DO SETUP(.CNT," ")
+17 DO SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
+18 QUIT
+19 ;
SETUP(CNT,LINE) ;
+1 SET CNT=CNT+1
+2 IF $DATA(VALMCNT)
SET ^TMP("FSC INSTALLS",$JOB,CNT,0)=LINE
QUIT
+3 SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)=LINE
+4 QUIT