1 | KMPDSSD1 ;OAK/RAK - CM Tools Status ;5/1/07 15:07
|
---|
2 | ;;2.0;CAPACITY MANAGEMENT TOOLS;**3,6**;Mar 22, 2002;Build 3
|
---|
3 | ;
|
---|
4 | CPU ;-- cpu/node data
|
---|
5 | ;
|
---|
6 | N COUNT,DATA,I,LEN,TEXT
|
---|
7 | ;
|
---|
8 | D CPUGET^KMPDUTL6(.DATA)
|
---|
9 | Q:'$D(DATA)
|
---|
10 | S LN=LN+1
|
---|
11 | D SET^VALM10(LN,"")
|
---|
12 | S TEXT=" Node/CPU Data............... "
|
---|
13 | S (COUNT,I,LEN)=0
|
---|
14 | F S I=$O(DATA(I)) Q:'I D
|
---|
15 | .S COUNT=COUNT+1,DATA=$G(DATA(I,0)) Q:DATA=""
|
---|
16 | .; length of node name
|
---|
17 | .S:'LEN LEN=$L($P(DATA,U))+2
|
---|
18 | .S TEXT=$S(COUNT=1:TEXT,1:$J(" ",32))_$P(DATA,U)
|
---|
19 | .S TEXT=TEXT_$J(" ",32-$L(TEXT)+LEN)_$P(DATA,U,2)_" ("_$P(DATA,U,3)_")"
|
---|
20 | .S LN=LN+1
|
---|
21 | .D SET^VALM10(LN,TEXT)
|
---|
22 | ;
|
---|
23 | Q
|
---|
24 | ;
|
---|
25 | MGRP ;-- mail group members
|
---|
26 | ;
|
---|
27 | N MEMBER,MEMBER1,NAME,NMARRY
|
---|
28 | ;
|
---|
29 | S IEN=$O(^XMB(3.8,"B","KMP-CAPMAN",0)) Q:'IEN
|
---|
30 | ;
|
---|
31 | S LN=LN+1
|
---|
32 | D SET^VALM10(LN,"")
|
---|
33 | ;
|
---|
34 | S TEXT=" KMP-CAPMAN Mail Group......."
|
---|
35 | ; check MEMBER field #2
|
---|
36 | S MEMBER=0
|
---|
37 | F S MEMBER=$O(^XMB(3.8,IEN,1,"B",MEMBER)) Q:'MEMBER D
|
---|
38 | .S NAME=$P($G(^VA(200,MEMBER,0)),U)
|
---|
39 | .I NAME'="" S NMARRY(NAME)=MEMBER
|
---|
40 | ; remote members
|
---|
41 | S MEMBER="",MEMBER1=0
|
---|
42 | F S MEMBER=$O(^XMB(3.8,IEN,6,"B",MEMBER)) Q:MEMBER="" D
|
---|
43 | .S MEMBER1=0
|
---|
44 | .F S MEMBER1=$O(^XMB(3.8,IEN,6,"B",MEMBER,MEMBER1)) Q:'MEMBER1 D
|
---|
45 | ..S NAME=$P($G(^XMB(3.8,IEN,6,MEMBER1,0)),U)
|
---|
46 | ..I NAME'="" S NMARRY(NAME)=MEMBER
|
---|
47 | ;
|
---|
48 | I '$D(NMARRY) S LN=LN+1 D SET^VALM10(LN,TEXT_" No Users") Q
|
---|
49 | ;
|
---|
50 | S NAME=""
|
---|
51 | F S NAME=$O(NMARRY(NAME)) Q:NAME="" D
|
---|
52 | .S MEMBER=NMARRY(NAME)
|
---|
53 | .S TEXT=TEXT_$J(" ",32-$L(TEXT))_NAME
|
---|
54 | .; if not a remote user
|
---|
55 | .I NAME'["@" D
|
---|
56 | ..S MEMBER=$$ACTIVE^XUSER(MEMBER) I '+MEMBER S TEXT=TEXT_" ("_$P(MEMBER,U,2)_")"
|
---|
57 | .S LN=LN+1
|
---|
58 | .D SET^VALM10(LN,TEXT)
|
---|
59 | .S TEXT=""
|
---|
60 | ;
|
---|
61 | Q
|
---|
62 | ;
|
---|
63 | ROUCHK(KMPDPKG) ;--display routine version info
|
---|
64 | ;-----------------------------------------------------------------------
|
---|
65 | ; KMPDPKG... CM Package:
|
---|
66 | ; "D" - CM Tools
|
---|
67 | ; "R" - RUM
|
---|
68 | ; "S" - SAGG
|
---|
69 | ;-----------------------------------------------------------------------
|
---|
70 | ;
|
---|
71 | Q:$G(KMPDPKG)=""
|
---|
72 | Q:KMPDPKG'="D"&(KMPDPKG'="R")&(KMPDPKG'="S")
|
---|
73 | ;
|
---|
74 | N I,TEXT,X
|
---|
75 | ;
|
---|
76 | ; routine check
|
---|
77 | D VERPTCH^KMPDUTL1(KMPDPKG,.X)
|
---|
78 | S LN=LN+1
|
---|
79 | D SET^VALM10(LN,"")
|
---|
80 | S LN=LN+1
|
---|
81 | D SET^VALM10(LN,"")
|
---|
82 | S TEXT=" "_$S(KMPDPKG="D":"CM TOOLS",KMPDPKG="R":"RUM",1:"SAGG")_" routines"
|
---|
83 | S TEXT=TEXT_$$REPEAT^XLFSTR(".",31-$L(TEXT))
|
---|
84 | I '$P($G(X(0)),U,3) S LN=LN+1 D SET^VALM10(LN,TEXT_" "_+X(0)_" Routines - No Problems") Q
|
---|
85 | S LN=LN+1
|
---|
86 | D SET^VALM10(LN,TEXT)
|
---|
87 | S LN=LN+1
|
---|
88 | D SET^VALM10(LN,$J(" ",20)_"Current Version"_$J(" ",20)_"Should be")
|
---|
89 | S I=0 F S I=$O(X(I)) Q:I="" I $P(X(I),U) D
|
---|
90 | .S TEXT=" "_I
|
---|
91 | .S TEXT=TEXT_$J(" ",20-$L(TEXT))_$P(X(I),U,4)
|
---|
92 | .S:$P(X(I),U,5)]"" TEXT=TEXT_" - "_$P(X(I),U,5)
|
---|
93 | .S TEXT=TEXT_$J(" ",55-$L(TEXT))_$P(X(I),U,2)
|
---|
94 | .S:$P(X(I),U,3)]"" TEXT=TEXT_" - "_$P(X(I),U,3)
|
---|
95 | .S LN=LN+1
|
---|
96 | .D SET^VALM10(LN,TEXT)
|
---|
97 | ;
|
---|
98 | Q
|
---|
99 | ;
|
---|
100 | PKG(KMPDNMSP) ;-- extrinsic function - return package name
|
---|
101 | ;-----------------------------------------------------------------------------
|
---|
102 | ; KMPDNMSP... H - HL7
|
---|
103 | ; R - RUM
|
---|
104 | ; S - SAGG
|
---|
105 | ; T - Timing
|
---|
106 | ;
|
---|
107 | ; Return: Package name
|
---|
108 | ; "" if not found
|
---|
109 | ;-----------------------------------------------------------------------------
|
---|
110 | ;
|
---|
111 | Q:$G(KMPDNMSP)="" ""
|
---|
112 | ;
|
---|
113 | N IEN,NMSP
|
---|
114 | S NMSP="KMP"_$S(KMPDNMSP="H"!(KMPDNMSP="T"):"D",1:KMPDNMSP)
|
---|
115 | S IEN=$O(^DIC(9.4,"C",NMSP,0))
|
---|
116 | Q $S(IEN:$P($G(^DIC(9.4,+IEN,0)),U),1:"")
|
---|