source: FOIAVistA/trunk/r/CAPACITY_MANAGEMENT_TOOLS-KMPD-KMPL/KMPDSSS.m@ 1114

Last change on this file since 1114 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 4.7 KB
Line 
1KMPDSSS ;OAK/RAK - CP Status - SAGG ;5/1/07 15:07
2 ;;2.0;CAPACITY MANAGEMENT TOOLS;**3,6**;Mar 22, 2002;Build 3
3 ;
4 ;
5FORMAT(KMPDLN) ;-format text for dislay
6 ;-----------------------------------------------------------------------------
7 ; KMPDLN.... return number of lines - called by reference
8 ;-----------------------------------------------------------------------------
9 ;
10 Q:$G(KMPDNMSP)=""
11 ;
12 N LN,X S LN=0 K TMP
13 ;
14 ; if no kmpsutl routine
15 S X="KMPSUTL" X ^%ZOSF("TEST") I '$T D Q
16 .S LN=LN+1
17 .D SET^VALM10(LN,"The SAGG Package is not installed!")
18 ;
19 ; status
20 D STATUS
21 ;
22 ; option data
23 D OPT^KMPDSSD("KMPS SAGG REPORT")
24 ;
25 ; bacground data
26 D BKGRND
27 ;
28 ; file data
29 D FILES
30 ;
31 ; routine version check
32 D ROUCHK^KMPDSSD1("S")
33 ;
34 ; node/cpu data
35 D CPU^KMPDSSD1
36 ;
37 ; mail group member
38 D MGRP^KMPDSSD1
39 ;
40 ; legend
41 D LEGEND
42 ;
43 S KMPDLN=LN
44 ;
45 Q
46 ;
47BKGRND ;- background
48 ;
49 N CURSTAT,LOC,OPT,PLTFRM,PROD,SITENUM,STAT,TEXT,VOL,VOLDA
50 ;
51 S SITENUM=$P($$SITE^VASITE(),U,3) Q:'SITENUM
52 S OPT="KMPS SAGG REPORT",STAT=$$TSKSTAT^KMPSUTL1(OPT),CURSTAT=$$CURSTAT^KMPDUTL1(STAT)
53 ;
54 S LN=LN+1
55 D SET^VALM10(LN,"")
56 S LN=LN+1
57 D SET^VALM10(LN," Temporary collection global.")
58 S LN=LN+1
59 D SET^VALM10(LN," ^XTMP(""KMPS"")............... "_$S('$D(^XTMP("KMPS",SITENUM,0)):"NOT ",1:"")_"Present")
60 ;
61 S PLTFRM=$$MPLTF^KMPDUTL1,PROD=$P(^%ZOSF("PROD"),",")
62 I PLTFRM="DSM" D
63 .S LOC=$G(^KMPS(8970.1,1,0))
64 .S TEXT=" Global Location............ "
65 .S TEXT=TEXT_$S($P(LOC,U,3)="":PROD,1:$P(LOC,U,3))_","_$S($P(LOC,U,2)="":"UNKNOWN",1:$P(LOC,U,2))
66 .S LN=LN+1
67 .D SET^VALM10(LN,TEXT)
68 ;
69 S LN=LN+1
70 D SET^VALM10(LN,"")
71 S LN=LN+1
72 D SET^VALM10(LN," SAGG Project collection routines will monitor the following:")
73 S LN=LN+1
74 D SET^VALM10(LN,"")
75 S (TEXT,VOL)=""
76 F S VOL=$O(^KMPS(8970.1,1,1,"B",VOL)) Q:VOL="" D
77 .S VOLDA=$O(^KMPS(8970.1,1,1,"B",VOL,0))
78 .S LOC=$P(^KMPS(8970.1,1,1,VOLDA,0),U,2)
79 .S:LOC="" LOC=PROD
80 .S TEXT=$J(" ",10)_VOL,LN=LN+1
81 .D SET^VALM10(LN,TEXT)
82 ;
83 I '+CURSTAT&$D(^XTMP("KMPS","START")) D
84 .S LN=LN+1 D SET^VALM10(LN,"") S LN=LN+1 D SET^VALM10(LN,"")
85 .S LN=LN+1
86 .D SET^VALM10(LN," SAGG Project collection routines are still running on:")
87 .S (TEXT,VOL)=""
88 .F S VOL=$O(^XTMP("KMPS","START",VOL)) Q:VOL="" D
89 ..S TEXT=$J(" ",10)_VOL,LN=LN+1
90 ..D SET^VALM10(LN,TEXT)
91 ;
92 ; check for any reported errors
93 I $D(^XTMP("KMPS","ERROR")) D
94 .S LN=LN+1 D SET^VALM10(LN,"") S LN=LN+1 D SET^VALM10(LN,"")
95 .S LN=LN+1
96 .D SET^VALM10(LN," SAGG Project collection routines have recorded an error on")
97 .S LN=LN+1
98 .D SET^VALM10(LN," the following Volume Set(s):")
99 .S LN=LN+1 D SET^VALM10(LN,"")
100 .S (TEXT,VOL)=""
101 .F S VOL=$O(^XTMP("KMPS","ERROR",VOL)) Q:VOL="" D
102 ..S TEXT=$J(" ",10)_VOL,LN=LN+1
103 ..D SET^VALM10(LN,TEXT) S TEXT=""
104 ;
105 ; check to see if SAGG was told to stop or has reported errors
106 I (+CURSTAT)>3 D
107 .I +CURSTAT=4 D
108 ..S LN=LN+1
109 ..D SET^VALM10(LN," SAGG has been running over a day. Use ^%S"_$S(PLTFRM="DSM":"Y",1:"S")_" and check to see if")
110 ..S LN=LN+1
111 ..D SET^VALM10(LN," the KMPSGE routine is still running.")
112 .S LN=LN+1
113 .D SET^VALM10(LN," NOTE: Any incomplete data that has been collected will be")
114 .S LN=LN+1
115 .D SET^VALM10(LN," deleted automatically the next time that SAGG runs.")
116 .I $D(^XTMP("KMPS","ERROR")) S LN=LN+1 D SET^VALM10(LN," First determine the cause of any volume set errors.")
117 .S LN=LN+1
118 .D SET^VALM10(LN," Reschedule SAGG to collect global data if necessary.")
119 ;
120 Q
121 ;
122FILES ;-- file data
123 ;
124 N TEXT,X
125 ;
126 S LN=LN+1
127 D SET^VALM10(LN,"")
128 S LN=LN+1
129 D SET^VALM10(LN,$J(" ",35)_" # of") ; Oldest Recent")
130 S LN=LN+1
131 D SET^VALM10(LN," File"_$J(" ",28)_"Entries") ; Date Date")
132 S LN=LN+1
133 D SET^VALM10(LN," ------------------------- -------") ; ------- -------")
134 ; file name
135 S TEXT=" 8970.1-"_$P($G(^DIC(8970.1,0)),U)
136 ; number of entries
137 S TEXT=TEXT_$J(" ",35-$L(TEXT))_$J($FN($P($G(^KMPS(8970.1,0)),U,4),",",0),7)
138 S LN=LN+1
139 D SET^VALM10(LN,TEXT)
140 ;
141 Q
142 ;
143LEGEND ;-- display full package name
144 ;
145 S LN=LN+1 D SET^VALM10(LN,"")
146 S LN=LN+1 D SET^VALM10(LN,"")
147 S LN=LN+1
148 D SET^VALM10(LN," SAGG = Statistical Analysis of Global Growth")
149 ;
150 Q
151 ;
152STATUS ;-- current status
153 ;
154 N CURSTAT,DOW,OPT,SESSNUM,SITNUM,STAT,STRTDT
155 ;
156 S SITNUM=$P($$SITE^VASITE(),U,3) Q:'SITNUM
157 S OPT="KMPS SAGG REPORT",STAT=$$TSKSTAT^KMPSUTL1(OPT),CURSTAT=$$CURSTAT^KMPDUTL1(STAT)
158 S LN=LN+1
159 D SET^VALM10(LN," Current Status.............. "_$P(CURSTAT,U,2))
160 I $D(^XTMP("KMPS",SITNUM,0)) D
161 .S SESSNUM=^XTMP("KMPS",SITNUM,0),STRTDT=$P(SESSNUM,U,4),SESSNUM=+SESSNUM
162 .S LN=LN+1
163 .D SET^VALM10(LN," Session Number.............. "_SESSNUM)
164 .S DOW=$$DOW^XLFDT(STRTDT)
165 .S LN=LN+1
166 .D SET^VALM10(LN," Start Date.................. "_$$FMTE^XLFDT(STRTDT,"P")_" ("_DOW_")")
167 ;
168 S LN=LN+1
169 D SET^VALM10(LN,"")
170 ;
171 Q
Note: See TracBrowser for help on using the repository browser.