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

XTPMKPP.m

Go to the documentation of this file.
  1. XTPMKPP ;OAK/BP - PATCH MONITOR PURGING;1/16/07
  1. ;;7.3;TOOLKIT;**98,104**; Apr 25, 1995;Build 3
  1. ;
  1. EN D DT^DICRW
  1. ; number of days to keep data in param file
  1. S XTBPDAYS=$P($G(^XPD(9.95,1,0)),U,2)
  1. I +XTBPDAYS=0 S XTBPDAYS=30 ; minimum of 30 days
  1. S X1=DT,X2=-XTBPDAYS D C^%DTC S XTBEND=X+.2359,XTBX=""
  1. F S XTBX=$O(^XPD(9.9,"B",XTBX)) Q:XTBX="" F XTBDA=0:0 S XTBDA=$O(^XPD(9.9,"B",XTBX,XTBDA)) Q:XTBDA="" DO
  1. .S XTBDTA=$G(^XPD(9.9,XTBDA,0)) Q:XTBDTA=""
  1. .I $P(XTBDTA,U,10) D NONKID(XTBDA,XTBDTA,XTBEND) Q
  1. .S XTBINST=$P(XTBDTA,U,8) ; install name
  1. .S XTBCMPDT=$P(XTBDTA,U,9) ; compliance date
  1. .S XTBXX=$O(^XPD(9.7,"B",XTBINST,"A"),-1) I +XTBXX'>0 Q
  1. .Q:$P($G(^XPD(9.7,+XTBXX,0)),U,9)'=3 ; not installed
  1. .I XTBCMPDT<XTBEND S DIK="^XPD(9.9,",DA=XTBDA D ^DIK
  1. K XTBPDAYS,X1,X2,XTBEND,XTBX,XTBXX,XTBDA,XTBCMPDT,DIK,DA,XTBINST,XTBDTA,X
  1. Q
  1. NONKID(XTBDA,XTBDTA,XTBEND) ;Delete Non_Kid patches
  1. N DA,DIK,XTNKB,XTNKBID,XTBCMPDT
  1. S XTBCMPDT=$P(XTBDTA,U,9) ; compliance date
  1. S XTNKB=$P(XTBDTA,U,10) ; Non-Kids build
  1. S XTNKBID=$P(XTBDTA,U,11) ; Non-Kids build Install date
  1. I XTBCMPDT,XTNKBID,XTBCMPDT<XTBEND S DIK="^XPD(9.9,",DA=XTBDA D ^DIK
  1. Q