1 | ENY2VAC2 ;(WIRMFO)/DH-National Roll-up of Y2K Data ;8.30.98
|
---|
2 | ;;7.0;ENGINEERING;**55**;August 17,1993
|
---|
3 | ROLLFC ; add functional classification to national roll-up
|
---|
4 | S STATION="" F S STATION=$O(COUNT(STATION)) Q:STATION="" D
|
---|
5 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+COUNT(STATION,J,"ACT")
|
---|
6 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F1^"_COUNT_U
|
---|
7 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+COUNT(STATION,J,"Y2K")
|
---|
8 | . S ENC(KOUNT,0)=ENC(KOUNT,0)_COUNT_U_COUNT(STATION,"MED","Y2K")_U_COUNT(STATION,"PC","Y2K")_U_COUNT(STATION,"FS","Y2K")_U_COUNT(STATION,"TEL","Y2K")_U_COUNT(STATION,0,"Y2K")_"^|"
|
---|
9 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+COUNT(STATION,J,"FC")
|
---|
10 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F2^"_COUNT_U_COUNT(STATION,"MED","FC")_U_COUNT(STATION,"PC","FC")_U_COUNT(STATION,"FS","FC")_U_COUNT(STATION,"TEL","FC")_U_COUNT(STATION,0,"FC")_"^|"
|
---|
11 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+COUNT(STATION,J,"CC")
|
---|
12 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F3^"_COUNT_U_COUNT(STATION,"MED","CC")_U_COUNT(STATION,"PC","CC")_U_COUNT(STATION,"FS","CC")_U_COUNT(STATION,"TEL","CC")_U_COUNT(STATION,0,"CC")_"^|"
|
---|
13 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+COUNT(STATION,J,"NC")
|
---|
14 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F4^"_COUNT_U_COUNT(STATION,"MED","NC")_U_COUNT(STATION,"PC","NC")_U_COUNT(STATION,"FS","NC")_U_COUNT(STATION,"TEL","NC")_U_COUNT(STATION,0,"NC")_"^|"
|
---|
15 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+COUNT(STATION,J,"NA")
|
---|
16 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F5^"_COUNT_U_COUNT(STATION,"MED","NA")_U_COUNT(STATION,"PC","NA")_U_COUNT(STATION,"FS","NA")_U_COUNT(STATION,"TEL","NA")_U_COUNT(STATION,0,"NA")_"^|"
|
---|
17 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+COUNT(STATION,J,0)
|
---|
18 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F6^"_COUNT_U_COUNT(STATION,"MED",0)_U_COUNT(STATION,"PC",0)_U_COUNT(STATION,"FS",0)_U_COUNT(STATION,"TEL",0)_U_COUNT(STATION,0,0)_"^|"
|
---|
19 | . S KOUNT=KOUNT+1 I 'COUNT(STATION,0,"Y2K") S ENC(KOUNT,0)="F7^^^^^|"
|
---|
20 | . E D
|
---|
21 | .. S ENC(KOUNT,0)="F7^"_COUNT(STATION,0,"Y2K")_U_COUNT(STATION,"TYPE","NX")_U_COUNT(STATION,"TYPE","BSE")_U_COUNT(STATION,"TYPE","EXP")_U_COUNT(STATION,"TYPE",0)_"^|"
|
---|
22 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+COUNT(STATION,J,"FC","UPG")
|
---|
23 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F8^"_COUNT_U_COUNT(STATION,"MED","FC","UPG")_U_COUNT(STATION,"PC","FC","UPG")_U_COUNT(STATION,"FS","FC","UPG")_U_COUNT(STATION,"TEL","FC","UPG")_U_COUNT(STATION,0,"FC","UPG")_"^|"
|
---|
24 | . S TOTAL=0 F J=0,"MED","PC","FS","TEL" S TOTAL=TOTAL+TOTAL(STATION,J,"FC","ECST")
|
---|
25 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F9^"_TOTAL_U_TOTAL(STATION,"MED","FC","ECST")_U_TOTAL(STATION,"PC","FC","ECST")_U_TOTAL(STATION,"FS","FC","ECST")_U_TOTAL(STATION,"TEL","FC","ECST")_U_TOTAL(STATION,0,"FC","ECST")_"^|"
|
---|
26 | . S TOTAL=0 F J=0,"MED","PC","FS","TEL" S TOTAL=TOTAL+TOTAL(STATION,J,"FC","ACST")
|
---|
27 | . S TOTAL=$P(TOTAL+.5,".")
|
---|
28 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F10^"_TOTAL_U_$P(TOTAL(STATION,"MED","FC","ACST")+.5,".")_U_$P(TOTAL(STATION,"PC","FC","ACST")+.5,".")_U
|
---|
29 | . S ENC(KOUNT,0)=ENC(KOUNT,0)_$P(TOTAL(STATION,"FS","FC","ACST")+.5,".")_U_$P(TOTAL(STATION,"TEL","FC","ACST")+.5,".")_U_$P(TOTAL(STATION,0,"FC","ACST")+.5,".")_"^|"
|
---|
30 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+COUNT(STATION,J,"CC")
|
---|
31 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F11^"_COUNT_U_COUNT(STATION,"MED","CC")_U_COUNT(STATION,"PC","CC")_U_COUNT(STATION,"FS","CC")_U_COUNT(STATION,"TEL","CC")_U_COUNT(STATION,0,"CC")_"^|"
|
---|
32 | . S TOTAL=0 F J=0,"MED","PC","FS","TEL" S TOTAL=TOTAL+TOTAL(STATION,J,"CC","ECST")
|
---|
33 | . S TOTAL=$P(TOTAL+.5,".")
|
---|
34 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F12^"_TOTAL_U_$P(TOTAL(STATION,"MED","CC","ECST")+.5,".")_U_$P(TOTAL(STATION,"PC","CC","ECST")+.5,".")_U_$P(TOTAL(STATION,"FS","CC","ECST")+.5,".")_U
|
---|
35 | . S ENC(KOUNT,0)=ENC(KOUNT,0)_$P(TOTAL(STATION,"TEL","CC","ECST")+.5,".")_U_$P(TOTAL(STATION,0,"CC","ECST")+.5,".")_"^|"
|
---|
36 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+COUNT(STATION,J,"NC","ATD")
|
---|
37 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F13^"_COUNT_U_COUNT(STATION,"MED","NC","ATD")_U_COUNT(STATION,"PC","NC","ATD")_U_COUNT(STATION,"FS","NC","ATD")_U_COUNT(STATION,"TEL","NC","ATD")_U_COUNT(STATION,0,"NC","ATD")_"^|"
|
---|
38 | . S TOTAL=0 F J=0,"MED","PC","FS","TEL" S TOTAL=TOTAL+TOTAL(STATION,J,"NC","ETD")
|
---|
39 | . S TOTAL=$P(TOTAL+.5,".")
|
---|
40 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F14^"_TOTAL_U_$P(TOTAL(STATION,"MED","NC","ETD")+.5,".")_U_$P(TOTAL(STATION,"PC","NC","ETD")+.5,".")_U_$P(TOTAL(STATION,"FS","NC","ETD")+.5,".")_U
|
---|
41 | . S ENC(KOUNT,0)=ENC(KOUNT,0)_$P(TOTAL(STATION,"TEL","NC","ETD")+.5,".")_U_$P(TOTAL(STATION,0,"NC","ETD")+.5,".")_"^|"
|
---|
42 | . S TOTAL=0 F J=0,"MED","PC","FS","TEL" S TOTAL=TOTAL+TOTAL(STATION,J,"NC","ATD")
|
---|
43 | . S TOTAL=$P(TOTAL+.5,".")
|
---|
44 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F15^"_TOTAL_U_$P(TOTAL(STATION,"MED","NC","ATD")+.5,".")_U_$P(TOTAL(STATION,"PC","NC","ATD")+.5,".")_U_$P(TOTAL(STATION,"FS","NC","ATD")+.5,".")_U
|
---|
45 | . S ENC(KOUNT,0)=ENC(KOUNT,0)_$P(TOTAL(STATION,"TEL","NC","ATD")+.5,".")_U_$P(TOTAL(STATION,0,"NC","ATD")+.5,".")_"^|"
|
---|
46 | . F J=0,"MED","PC","FS","TEL" S X(J)=COUNT(STATION,J,"NC","REP")-COUNT(STATION,J,"NC","ATD"),X1(J)=TOTAL(STATION,J,"NC","ETOT")-TOTAL(STATION,J,"NC","ETD")
|
---|
47 | . F J=0,"MED","PC","FS","TEL" S X1(J)=$P(X1(J)+.5,".")
|
---|
48 | . S COUNT=0 F J=0,"MED","PC","TEL","FS" S COUNT=COUNT+X(J)
|
---|
49 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F16^"_COUNT_U_X("MED")_U_X("PC")_U_X("FS")_U_X("TEL")_U_X(0)_"^|"
|
---|
50 | . S TOTAL=0 F J=0,"MED","PC","FS","TEL" S TOTAL=TOTAL+X1(J)
|
---|
51 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F17^"_TOTAL_U_X1("MED")_U_X1("PC")_U_X1("FS")_U_X1("TEL")_U_X1(0)_"^|"
|
---|
52 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+COUNT(STATION,J,"NC","RETACT")
|
---|
53 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F18^"_COUNT_U_COUNT(STATION,"MED","NC","RETACT")_U_COUNT(STATION,"PC","NC","RETACT")_U_COUNT(STATION,"FS","NC","RETACT")_U_COUNT(STATION,"TEL","NC","RETACT")_U_COUNT(STATION,0,"NC","RETACT")_"^|"
|
---|
54 | . F J=0,"MED","PC","FS","TEL" S X(J)=COUNT(STATION,J,"NC","RET")-COUNT(STATION,J,"NC","RETACT")
|
---|
55 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+X(J)
|
---|
56 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F19^"_COUNT_U_X("MED")_U_X("PC")_U_X("FS")_U_X("TEL")_U_X(0)_"^|"
|
---|
57 | . S COUNT=0 F J=0,"MED","PC","FS","TEL" S COUNT=COUNT+COUNT(STATION,J,"NC","USE")
|
---|
58 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="F20^"_COUNT_U_COUNT(STATION,"MED","NC","USE")_U_COUNT(STATION,"PC","NC","USE")_U_COUNT(STATION,"FS","NC","USE")_U_COUNT(STATION,"TEL","NC","USE")_U_COUNT(STATION,0,"NC","USE")_"^|"
|
---|
59 | Q
|
---|
60 | ;
|
---|
61 | ROLLUTL ; add utility systems summary to national roll-up
|
---|
62 | S STATION="" F S STATION=$O(COUNT(STATION)) Q:STATION="" D
|
---|
63 | . S COUNT(STATION,"SYS","TOT")=0,COUNT(STATION,"SYS","FC")=0,COUNT(STATION,"SYS","NC")=0 F J=0,"ALARM","COMM","ELECT","ENVRN","FIRE","OTHER","SCRTY","TRANS","WATER" D
|
---|
64 | .. S COUNT(STATION,"SYS","TOT")=COUNT(STATION,"SYS","TOT")+COUNT(STATION,"SYS",J,"TOT"),COUNT(STATION,"SYS","FC")=COUNT(STATION,"SYS","FC")+COUNT(STATION,"SYS",J,"FC")
|
---|
65 | .. S COUNT(STATION,"SYS","NC")=COUNT(STATION,"SYS","NC")+COUNT(STATION,"SYS",J,"NC")
|
---|
66 | . S COUNT(STATION,"COMP","TOT")=0,COUNT(STATION,"COMP","FC")=0,COUNT(STATION,"COMP","NC")=0,COUNT(STATION,"COMP","CC")=0,TOTAL(STATION,"ECST")=0
|
---|
67 | . F J=0,"ALARM","COMM","ELECT","ENVRN","FIRE","OTHER","SCRTY","TRANS","WATER" D
|
---|
68 | .. S COUNT(STATION,"COMP","TOT")=COUNT(STATION,"COMP","TOT")+COUNT(STATION,"COMP",J,"TOT"),COUNT(STATION,"COMP","FC")=COUNT(STATION,"COMP","FC")+COUNT(STATION,"COMP",J,"FC")
|
---|
69 | .. S COUNT(STATION,"COMP","NC")=COUNT(STATION,"COMP","NC")+COUNT(STATION,"COMP",J,"NC"),COUNT(STATION,"COMP","CC")=COUNT(STATION,"COMP","CC")+COUNT(STATION,"COMP",J,"CC"),TOTAL(STATION,"ECST")=TOTAL(STATION,"ECST")+TOTAL(STATION,"ECST",J)
|
---|
70 | . F J="TOT","FC","NC" S KOUNT=KOUNT+1,ENC(KOUNT,0)="US^"_J_U_COUNT(STATION,"SYS",J) D
|
---|
71 | .. F K=0,"ALARM","COMM","ELECT","ENVRN","FIRE","OTHER","SCRTY","TRANS","WATER" S ENC(KOUNT,0)=ENC(KOUNT,0)_U_COUNT(STATION,"SYS",K,J)
|
---|
72 | .. S ENC(KOUNT,0)=ENC(KOUNT,0)_"^|"
|
---|
73 | . F J="TOT","FC","NC","CC" S KOUNT=KOUNT+1,ENC(KOUNT,0)="UC^"_J_U_COUNT(STATION,"COMP",J) D
|
---|
74 | .. F K=0,"ALARM","COMM","ELECT","ENVRN","FIRE","OTHER","SCRTY","TRANS","WATER" S ENC(KOUNT,0)=ENC(KOUNT,0)_U_COUNT(STATION,"COMP",K,J)
|
---|
75 | .. S ENC(KOUNT,0)=ENC(KOUNT,0)_"^|"
|
---|
76 | . S KOUNT=KOUNT+1,ENC(KOUNT,0)="UC1^COST^"_TOTAL(STATION,"ECST") F J=0,"ALARM","COMM","ELECT","ENVRN","FIRE","OTHER","SCRTY","TRANS","WATER" S ENC(KOUNT,0)=ENC(KOUNT,0)_U_TOTAL(STATION,"ECST",J)
|
---|
77 | . S ENC(KOUNT,0)=ENC(KOUNT,0)_"^|"
|
---|
78 | Q
|
---|
79 | ;ENY2VAC2
|
---|