113 lines
5.0 KiB
Mathematica
113 lines
5.0 KiB
Mathematica
|
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
|