source: FOIAVistA/trunk/r/CAPACITY_MANAGEMENT_TOOLS-KMPD-KMPL/KMPDUTL6.m@ 1094

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1KMPDUTL6 ;OIFO/RAK - CPU Utilities ;2/17/04 10:58
2 ;;2.0;CAPACITY MANAGEMENT TOOLS;;Mar 22, 2002
3 ;;
4CPUDEL ;-- delete cpu data from file #8973 - cp parameters
5 ;
6 N DA,DIK,X,Y
7 ;
8 S DA(1)=$O(^KMPD(8973,0)) Q:'DA(1)
9 S DIK="^KMPD(8973,"_DA(1)_",20,"
10 F DA=0:0 S DA=$O(^KMPD(8973,DA(1),20,DA)) Q:'DA D ^DIK
11 ;
12 Q
13 ;
14CPUGET(KMPDARRY) ;--get cpu data
15 ;-----------------------------------------------------------------------
16 ; KMPDARRY... Return array (passed by reference) in format:
17 ; KMPDARRY(1)=Node
18 ;-----------------------------------------------------------------------
19 ;
20 K KMPDARRY
21 Q:$G(^KMPD(8973,1,20,0))=""
22 M KMPDARRY=^KMPD(8973,1,20)
23 ;
24 Q
25 ;
26CPUSET(KMPDLT) ;-- set cpu info into file #8973 cp parameters
27 ;---------------------------------------------------------------------
28 ; KMPDLT... Delete previous entries
29 ; 0 - do not delete
30 ; 1 - delete
31 ;---------------------------------------------------------------------
32 ;
33 S KMPDLT=+$G(KMPDLT)
34 ;
35 N CPU,IEN,ERROR,FDA,NODE,ZIEN
36 ;
37 ; delete current CPU entries
38 D:KMPDLT CPUDEL
39 ;
40 S IEN=$O(^KMPD(8973,0)) Q:'IEN
41 ; get cpu data
42 D CPU^KMPDUTL5(.CPU) Q:'$D(CPU)
43 ; file cpu data
44 S NODE=""
45 F S NODE=$O(CPU(NODE)) Q:NODE="" D
46 .K FDA,ERROR,ZIEN
47 .S FDA($J,8973.201,"?+1,"_IEN_",",.01)=NODE
48 .S FDA($J,8973.201,"?+1,"_IEN_",",.02)=$P(CPU(NODE),U)
49 .S FDA($J,8973.201,"?+1,"_IEN_",",.03)=$P(CPU(NODE),U,2)
50 .S FDA($J,8973.201,"?+1,"_IEN_",",.04)=$P(CPU(NODE),U,3)
51 .S FDA($J,8973.201,"?+1,"_IEN_",",.05)=$P(CPU(NODE),U,4)
52 .D UPDATE^DIE("","FDA($J)",.ZIEN,"ERROR")
53 ;
54 Q
Note: See TracBrowser for help on using the repository browser.