KMPSLK ;SF/KAK - Thru The Looking Glass ;27 AUG 97 2:07 pm
;;1.8;SAGG PROJECT;**1**;May 14, 1999
;
ZER ; Collect zeroth node information
;
S U="^",^XTMP("KMPS",KMPSSITE,NUM,"@ZER",0)=$P(^DIC(0),U)_U_$P(^DIC(0),U,4)_"^DIC(^",^XTMP("KMPS",KMPSSITE,NUM,"@ZER","TM")=$S($D(^%ZTSK(-1)):^(-1),1:^%ZTSK(0))
S KMPSN=0 F S KMPSN=$O(^DIC(KMPSN)) Q:'+KMPSN D
.Q:$G(^DIC(KMPSN,0))=""
.Q:'$D(^DIC(KMPSN,0,"GL")) S KMPSNM=$G(^DIC(KMPSN,0,"GL")) Q:KMPSNM=""
.S ^XTMP("KMPS",KMPSSITE,NUM,"@ZER",KMPSN)=$P(^DIC(KMPSN,0),U)_U_$P($G(@(KMPSNM_"0)")),U,4)_KMPSNM_U_$G(^DD(+$P(^DIC(KMPSN,0),U,2),0,"VR"))_U_$P($G(@(KMPSNM_"0)")),U,3)
; file# = file_name^# of entries^global_name^file_version^last id number
;
PKG ; Collect package file information
;
S KMPSN=0 F S KMPSN=$O(^DIC(9.4,KMPSN)) Q:'+KMPSN I $D(^DIC(9.4,KMPSN,0)) S KMPSD=$P($G(^DIC(9.4,KMPSN,0)),U,2) D
.I $E(KMPSD)="A" I ($A($E(KMPSD,2))>64)&($A($E(KMPSD,2))<88) I (($A($E(KMPSD,3))>64)&($A($E(KMPSD,3))<89)) Q
.S KMPSV=0,(KMPSVL,KMPSD)="" F S KMPSV=$O(^DIC(9.4,KMPSN,22,KMPSV)) Q:'+KMPSV S KMPSVL=KMPSV
.I +KMPSVL S KMPSV=$G(^DIC(9.4,KMPSN,22,KMPSVL,0)),KMPSD=$P(KMPSV,U,3),KMPSV=$P(KMPSV,U)
.S ^XTMP("KMPS",KMPSSITE,NUM,"@PKG",$P(^DIC(9.4,KMPSN,0),U))=$P($G(^DIC(9.4,KMPSN,0)),U,2)_U_$G(^("VERSION"))_U_KMPSV_U_KMPSD
; pkg_name = pkg_prefix^current version_last version_install date
;
SYS ; Collect volume set (@VOL) and system (@SYS) information
;
D EN^%ZOSVKSD(KMPSSITE,NUM,.KMPSVOLS),@KMPSX1 G END
;
VAX ; DSM
S ^XTMP("KMPS",KMPSSITE,NUM,"@SYS")=$&ZLIB.%VERSION("NAME")_U_$ZC(%GETSYI,"VERSION") Q:$ZV'[6.
S KMPSD=$ZC(%GETSYI,"CLUSTER_MEMBER")
I 'KMPSD S KMPSD=$ZC(%GETSYI,"NODENAME"),^XTMP("KMPS",KMPSSITE,NUM,"@SYS",KMPSD)=$ZC(%GETSYI,"HW_NAME") Q
D CLSTR D S X="ERR1^KMPSGE",@^%ZOSF("TRAP") Q
.S KMPSD="" F S KMPSD=$O(KMPSNM(KMPSD)) Q:KMPSD="" S ^XTMP("KMPS",KMPSSITE,NUM,"@SYS",KMPSD)=$ZC(%GETSYI,"HW_NAME",KMPSNM(KMPSD))
CLSTR ; Call $GETSYI using wild card to get CSID and NODENAME for all nodes
S X="ERRCLU^KMPSLK",@^%ZOSF("TRAP"),$ZE="" K KMPSN,KMPSNM
S KMPSN($ZC(%GETSYI,"NODE_CSID",-1))=""
F S KMPSN($ZC(%GETSYI,"NODE_CSID",""))=""
ERRCLU I $ZE'["NOMORENODE" ZQ
S KMPSD="" F S KMPSD=$O(KMPSN(KMPSD)) Q:KMPSD="" S KMPSNM($ZC(%GETSYI,"NODENAME",KMPSD))=KMPSD
Q
;
MSM ;
MSMV4 ;
S ^XTMP("KMPS",KMPSSITE,NUM,"@SYS")=$ZV_U_$ZOS(4)
Q
;
OMNT ; OpenM-NT
S ^XTMP("KMPS",KMPSSITE,NUM,"@SYS")=$ZV_U_$S($ZU(100)=0:"Windows NT",$ZU(100)=1:"Windows 95",1:$ZU(100))
Q
;
END ;
K KMPSD,KMPSN,KMPSNM,KMPSV,KMPSVL
Q
;
OUT ; Called from routine KMPSGE
; Create 'successful' end-game message text
;
S KMPSTEXT(1)=" The SAGG Project collection routines monitored the following:",KMPSTEXT(2)="" D
.K KMPSX S KMPSX1="" F S KMPSX1=$O(^XTMP("KMPS",KMPSSITE,NUM,KMPSDT,KMPSX1)) Q:KMPSX1="" S KMPSX2="" F S KMPSX2=$O(^XTMP("KMPS",KMPSSITE,NUM,KMPSDT,KMPSX1,KMPSX2)) Q:KMPSX2="" S KMPSX(KMPSX2)=""
.S KMPSX=0,KMPSX1="" F KMPSI=3:1 Q:KMPSX S KMPSTEXT(KMPSI)=" " F KMPSJ=1:1:5 S KMPSX1=$O(KMPSX(KMPSX1)) S:KMPSX1="" KMPSX=1 Q:KMPSX1="" S KMPSTEXT(KMPSI)=KMPSTEXT(KMPSI)_KMPSX1_" "
S KMPSTEXT(KMPSI)="",KMPSTEXT(KMPSI+1)=" Please ensure that this list concurs with your present volume set",KMPSTEXT(KMPSI+2)=" configuration.",KMPSTEXT(KMPSI+3)=""
S KMPSTEXT(KMPSI+4)=" A local e-mail message #"_KMPSXMZ_" was created by the collection",KMPSTEXT(KMPSI+5)=" routines. Check the ISC-ALBANY.VA.GOV NetMail Queue to ensure",KMPSTEXT(KMPSI+6)=" transmission delivery."
;
MSG ; Send e-mail message to local KMPS-SAGG mailgroup
;
K XMY S:'$D(XMDUZ) XMDUZ=.5 S:'$D(DUZ) DUZ=.5 S U="^"
S XMSUB="SAGG Project Message (Session #"_NUM_")",XMTEXT="KMPSTEXT("
I $D(^XMB(3.8,"B","KMPS-SAGG")) S KMPSXM=$O(^XMB(3.8,"B","KMPS-SAGG",0)) S KMPSXMN=0 F S KMPSXMN=$O(^XMB(3.8,KMPSXM,1,"B",KMPSXMN)) Q:KMPSXMN="" S XMY(KMPSXMN)=""
D:$D(XMY) ^XMD
END1 ;
K ^XTMP("KMPS",KMPSSITE),^XTMP("KMPS","ERROR"),^XTMP("KMPS","START"),^XTMP("KMPS","STOP"),^XTMP("KMPS",0)
K %,KMPSCUR,KMPSDT,KMPSFS,KMPSLOC,KMPSI,KMPSJ,KMPSJOB,KMPSMGR,KMPSPROD,KMPSRUN,KMPSSITE,KMPSSTRT
K KMPSTEMP,KMPSTEXT,KMPSUCI,KMPSUCIN,KMPSUTL,KMPSVA,KMPSVOL,KMPSX,KMPSX1,KMPSX2,KMPSXM,KMPSXMB,KMPSXMN,KMPSXMZ
K N,NM,X,XMDUZ,XMN,XMSUB,XMTEXT,XMY,XMZ
S ZTREQ="@"
L -^XTMP("KMPS") Q
KMPSLK ;SF/KAK - Thru The Looking Glass ;27 AUG 97 2:07 pm
+1 ;;1.8;SAGG PROJECT;**1**;May 14, 1999
+2 ;
ZER ; Collect zeroth node information
+1 ;
+2 SET U="^"
SET ^XTMP("KMPS",KMPSSITE,NUM,"@ZER",0)=$PIECE(^DIC(0),U)_U_$PIECE(^DIC(0),U,4)_"^DIC(^"
SET ^XTMP("KMPS",KMPSSITE,NUM,"@ZER","TM")=$SELECT($DATA(^%ZTSK(-1)):^(-1),1:^%ZTSK(0))
+3 SET KMPSN=0
FOR
SET KMPSN=$ORDER(^DIC(KMPSN))
IF '+KMPSN
QUIT
Begin DoDot:1
+4 IF $GET(^DIC(KMPSN,0))=""
QUIT
+5 IF '$DATA(^DIC(KMPSN,0,"GL"))
QUIT
SET KMPSNM=$GET(^DIC(KMPSN,0,"GL"))
IF KMPSNM=""
QUIT
+6 SET ^XTMP("KMPS",KMPSSITE,NUM,"@ZER",KMPSN)=$PIECE(^DIC(KMPSN,0),U)_U_$PIECE($GET(@(KMPSNM_"0)")),U,4)_KMPSNM_U_$GET(^DD(+$PIECE(^DIC(KMPSN,0),U,2),0,"VR"))_U_$PIECE($GET(@(KMPSNM_"0)")),U,3)
End DoDot:1
+7 ; file# = file_name^# of entries^global_name^file_version^last id number
+8 ;
PKG ; Collect package file information
+1 ;
+2 SET KMPSN=0
FOR
SET KMPSN=$ORDER(^DIC(9.4,KMPSN))
IF '+KMPSN
QUIT
IF $DATA(^DIC(9.4,KMPSN,0))
SET KMPSD=$PIECE($GET(^DIC(9.4,KMPSN,0)),U,2)
Begin DoDot:1
+3 IF $EXTRACT(KMPSD)="A"
IF ($ASCII($EXTRACT(KMPSD,2))>64)&($ASCII($EXTRACT(KMPSD,2))<88)
IF (($ASCII($EXTRACT(KMPSD,3))>64)&($ASCII($EXTRACT(KMPSD,3))<89))
QUIT
+4 SET KMPSV=0
SET (KMPSVL,KMPSD)=""
FOR
SET KMPSV=$ORDER(^DIC(9.4,KMPSN,22,KMPSV))
IF '+KMPSV
QUIT
SET KMPSVL=KMPSV
+5 IF +KMPSVL
SET KMPSV=$GET(^DIC(9.4,KMPSN,22,KMPSVL,0))
SET KMPSD=$PIECE(KMPSV,U,3)
SET KMPSV=$PIECE(KMPSV,U)
+6 SET ^XTMP("KMPS",KMPSSITE,NUM,"@PKG",$PIECE(^DIC(9.4,KMPSN,0),U))=$PIECE($GET(^DIC(9.4,KMPSN,0)),U,2)_U_$GET(^("VERSION"))_U_KMPSV_U_KMPSD
End DoDot:1
+7 ; pkg_name = pkg_prefix^current version_last version_install date
+8 ;
SYS ; Collect volume set (@VOL) and system (@SYS) information
+1 ;
+2 DO EN^%ZOSVKSD(KMPSSITE,NUM,.KMPSVOLS)
DO @KMPSX1
GOTO END
+3 ;
VAX ; DSM
+1 SET ^XTMP("KMPS",KMPSSITE,NUM,"@SYS")=$&ZLIB.%VERSION("NAME")_U_$ZC(%GETSYI,"VERSION")
IF $ZV'[6.
QUIT
+2 SET KMPSD=$ZC(%GETSYI,"CLUSTER_MEMBER")
+3 IF 'KMPSD
SET KMPSD=$ZC(%GETSYI,"NODENAME")
SET ^XTMP("KMPS",KMPSSITE,NUM,"@SYS",KMPSD)=$ZC(%GETSYI,"HW_NAME")
QUIT
+4 DO CLSTR
Begin DoDot:1
+5 SET KMPSD=""
FOR
SET KMPSD=$ORDER(KMPSNM(KMPSD))
IF KMPSD=""
QUIT
SET ^XTMP("KMPS",KMPSSITE,NUM,"@SYS",KMPSD)=$ZC(%GETSYI,"HW_NAME",KMPSNM(KMPSD))
End DoDot:1
SET X="ERR1^KMPSGE"
SET @^%ZOSF("TRAP")
QUIT
CLSTR ; Call $GETSYI using wild card to get CSID and NODENAME for all nodes
+1 SET X="ERRCLU^KMPSLK"
SET @^%ZOSF("TRAP")
SET $ZE=""
KILL KMPSN,KMPSNM
+2 SET KMPSN($ZC(%GETSYI,"NODE_CSID",-1))=""
+3 FOR
SET KMPSN($ZC(%GETSYI,"NODE_CSID",""))=""
ERRCLU IF $ZE'["NOMORENODE"