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

FSCSTUPT.m

Go to the documentation of this file.
FSCSTUPT ;SLC/STAFF-NOIS Site Tracking Update - Patches (Test) Installed ;1/4/98  20:49
 ;;1.1;NOIS;;Sep 06, 1998
 ;
TEST(PATCH,CNT) ; from FSCLMIPX, FSCRPCG
 N DOMAIN,INDATE,LINE,NUM,SITENAME,VDATE,ZERO K ^TMP("FSC PATCH",$J)
 S CNT=+$G(CNT)
 S PATCH=+$G(PATCH) I 'PATCH Q
 S VDATE=$P($G(^A1AE(11005,PATCH,0)),U,11)
 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) 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))
 ..I VDATE,INDATE'<VDATE Q
 ..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,"        No test installs of this patch at any site.")
 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
 ;
SITE(SITE,CNT) ; from FSCLMIPX, FSCRPCG
 N DAY,DOMAIN,INDATE,LINE,NUM,PATCH,PATCH0,SUBJECT,ZERO
 S CNT=+$G(CNT)
 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=""  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
 ..Q:$P(PATCH0,U,11)  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 unreleased patches installed at this site.")
 D SETUP(.CNT," ")
 D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
 Q
 ;
PACK(MODULE,CNT) ; from FSCLMIPX, FSCRPCG
 N DOMAIN,INDATE,LINE,NUM,PACKAGE,PATCH,PATCH0,SITENAME,SUBJECT,VERSION,ZERO
 S CNT=+$G(CNT)
 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,"APVPD",PACKAGE,VERSION,PATCH)) Q:PATCH<1  D
 .S PATCH0=$G(^A1AE(11005,PATCH,0)) I '$L(PATCH0) Q
 .Q:$P(PATCH0,U,11)  S SUBJECT=$P(PATCH0,U,5)
 .S DOMAIN=0 F  S DOMAIN=$O(^NTS(2050.2,"APVPD",PACKAGE,VERSION,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 NUM=0 F  S NUM=$O(^NTS(2050.2,"APVPD",PACKAGE,VERSION,PATCH,DOMAIN,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(SITENAME,$P(PATCH0,U),15,$L(SITENAME))
 ...S LINE=$$SETSTR^VALM1(INDATE,LINE,45,$L(INDATE))
 ...D SETUP(.CNT,LINE)
 I 'CNT D SETUP(.CNT,"        No unreleased patches installed for this package.")
 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