source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENPL5D.m@ 1150

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

initial load of WorldVistAEHR

File size: 4.8 KB
Line 
1ENPL5D ;(WIRMFO)/LKG,SAB-FYFP REPORT: PLAN SUMMARY PAGE ;5/15/96
2 ;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
3PS N ENB,ENC,ENI,ENLD,ENLE,ENPR,ENX
4 S $P(ENLD," ",10)="",ENLE=ENLD
5 F ENI=1:1:6 S ENLD=ENLD_" --- ----------"
6 F ENI=1:1:6 S ENLE=ENLE_" === =========="
7 I ENFYB'="F" F ENYR=ENFY+ENFYB:1:ENFY+$S(ENFYE="F":5,1:ENFYE) D SUBTOT
8 I ENFYE="F" S ENYR="F" D SUBTOT
9 D HD
10 I ENFYB'="F" F ENYR=ENFY+ENFYB:1:ENFY+$S(ENFYE="F":5,1:ENFYE) D
11 . W:$E(IOST,1,2)'="C-" !
12 . W !,?5,"FY ",ENYR
13 . S ENX="ENT(ENYR," D LN
14 . I ENYR=ENFY W !,?5,ENLE,!
15 . I ENYR=(ENFY+$S(ENFYE="F":5,1:ENFYE)) D
16 . . W !,?5,ENLE,!,?5,"PLAN TOTAL" S ENX="ENB(" D LN W !
17 I ENFYE="F" S ENYR="F" D
18 . W:$E(IOST,1,2)'="C-" !
19 . W !,?5,"FY FUTURE"
20 . S ENX="ENT(ENYR," D LN
21 . W !,?5,ENLE,!,?5,"PLAN+FUTURE" S ENX="ENC(" D LN
22 D FT
23 Q
24SUBTOT ; add program totals for year (ENYR) to FYFP subtotals
25 K ENT(ENYR,"C")
26 F ENPR="MA","MI","MM","NR","LE" D
27 . I "^MA^MI^MM^NR^"[(U_ENPR_U) D ; const year total
28 . . S $P(ENT(ENYR,"C"),U)=$P($G(ENT(ENYR,"C")),U)+$P($G(ENT(ENYR,ENPR)),U)
29 . . S $P(ENT(ENYR,"C"),U,2)=$P($G(ENT(ENYR,"C")),U,2)+$P($G(ENT(ENYR,ENPR)),U,2)
30 . Q:ENYR=ENFY
31 . ; plan+future total
32 . S $P(ENC(ENPR),U,1)=$P($G(ENC(ENPR)),U,1)+$P($G(ENT(ENYR,ENPR)),U,1)
33 . S $P(ENC(ENPR),U,2)=$P($G(ENC(ENPR)),U,2)+$P($G(ENT(ENYR,ENPR)),U,4)
34 . I "^MA^MI^MM^NR^"[(U_ENPR_U) D ; const plan+future total
35 . . S $P(ENC("C"),U,1)=$P($G(ENC("C")),U,1)+$P($G(ENT(ENYR,ENPR)),U,1)
36 . . S $P(ENC("C"),U,2)=$P($G(ENC("C")),U,2)+$P($G(ENT(ENYR,ENPR)),U,4)
37 . Q:ENYR="F"
38 . ; plan total
39 . S $P(ENB(ENPR),U,1)=$P($G(ENB(ENPR)),U,1)+$P($G(ENT(ENYR,ENPR)),U,1)
40 . S $P(ENB(ENPR),U,2)=$P($G(ENB(ENPR)),U,2)+$P($G(ENT(ENYR,ENPR)),U,3)
41 . I "^MA^MI^MM^NR^"[(U_ENPR_U) D ; const plan total
42 . . S $P(ENB("C"),U,1)=$P($G(ENB("C")),U,1)+$P($G(ENT(ENYR,ENPR)),U,1)
43 . . S $P(ENB("C"),U,2)=$P($G(ENB("C")),U,2)+$P($G(ENT(ENYR,ENPR)),U,3)
44 Q
45LN ; cost line for ENX array
46 W ?18,$J($P($G(@(ENX_"""MA"")")),U,2)+0,3)
47 W ?23,"$",$J($FN($P($G(@(ENX_"""MA"")")),U),","),9)
48 W ?37,$J($P($G(@(ENX_"""MI"")")),U,2)+0,3)
49 W ?42,"$",$J($FN($P($G(@(ENX_"""MI"")")),U),","),9)
50 W ?56,$J($P($G(@(ENX_"""MM"")")),U,2)+0,3)
51 W ?61,"$",$J($FN($P($G(@(ENX_"""MM"")")),U),","),9)
52 W ?75,$J($P($G(@(ENX_"""NR"")")),U,2)+0,3)
53 W ?80,"$",$J($FN($P($G(@(ENX_"""NR"")")),U),","),9)
54 W ?94,$J($P($G(@(ENX_"""C"")")),U,2)+0,3)
55 W ?99,"$",$J($FN($P($G(@(ENX_"""C"")")),U),","),9)
56 W ?113,$J($P($G(@(ENX_"""LE"")")),U,2)+0,3)
57 W ?118,"$",$J($FN($P($G(@(ENX_"""LE"")")),U),","),9)
58 Q
59HD ; page header
60 D FYFPHD^ENPL5A
61 W !,?42,"PLAN SUMMARY BY PROGRAMS AND FISCAL YEARS (in $000)"
62 W:$E(IOST,1,2)'="C-" !
63 W !,?23,"MAJOR",?42,"MINOR",?58,"MINOR MISC",?81,"NRM"
64 W ?96,"CONST TOTAL",?115,"LEASE TOTAL"
65 W !,?18,"CNT",?26,"COST",?37,"CNT",?45,"COST",?56,"CNT",?64,"COST"
66 W ?75,"CNT",?83,"COST",?94,"CNT",?102,"COST",?113,"CNT",?121,"COST"
67 W !,?5,ENLD
68 Q
69FT ; page footer
70 W:$E(IOST,1,2)'="C-" !!!!!,?5,"________________________"
71 ;F ENI=$Y+9:1:IOSL W !
72 F ENI=$Y+9:1:$S(IOSL>254:$Y+12,1:IOSL) W ! ; for long page length
73 W !,?5,"PLAN and PLAN+FUTURE counts only include split year projects once and may not equal the sum of the year counts."
74 W !,?5,"Lease column excludes Expedited leases."
75 W:$E(IOST,1,2)'="C-" !
76 S ENPG=ENPG+1 W !,?64,"Page ",ENPG,?100,ENRDT
77 I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR S:'Y END=1
78 Q
79SUM ; add a project to year-program totals
80 N ENFYAE,ENFYCO
81 ; input variables
82 ; ENYR year
83 ; ENPR program
84 ; ENFY current year of 5-Yr Plan
85 ; ENCST oost in thousands
86 ; ENT( (optional) current totals
87 ; for MA,MI,MM,NR programs
88 ; ENAE true if funding year A/E in ENYR
89 ; ENCO true if funding year Const in ENYR
90 ; output variables
91 ; ENT(ENYR,ENPR array modified
92 S $P(ENT(ENYR,ENPR),U)=$P($G(ENT(ENYR,ENPR)),U)+ENCST ; cost
93 S $P(ENT(ENYR,ENPR),U,2)=$P($G(ENT(ENYR,ENPR)),U,2)+1 ; cnt
94 S $P(ENT(ENYR,ENPR),U,3)=$P($G(ENT(ENYR,ENPR)),U,3)+1 ; plan cnt
95 S $P(ENT(ENYR,ENPR),U,4)=$P($G(ENT(ENYR,ENPR)),U,4)+1 ; plan+future cnt
96 Q:"^MA^MI^MM^NR^"'[(U_ENPR_U) ; only check const. proj for split year
97 S ENFYAE=$P($G(^ENG("PROJ",ENDA,5)),U,7)
98 S ENFYCO=$P($G(^ENG("PROJ",ENDA,0)),U,7)
99 I ENFYAE]"",ENFYCO]"",'(ENAE&ENCO) D ; split year adjustments
100 . I ENFYAE'<(ENFY+$S(ENFYB="F":6,ENFYB=0:1,1:ENFYB)),ENFYAE'>(ENFY+$S(ENFYE="F":5,1:ENFYE)),ENFYCO'<(ENFY+$S(ENFYB="F":6,ENFYB=0:1,1:ENFYB)),ENFYCO'>(ENFY+$S(ENFYE="F":5,1:ENFYE)) D Q
101 . . ; both in plan range (adjust count)
102 . . S $P(ENT(ENYR,ENPR),U,3)=$P($G(ENT(ENYR,ENPR)),U,3)-.5
103 . . S $P(ENT(ENYR,ENPR),U,4)=$P($G(ENT(ENYR,ENPR)),U,4)-.5
104 . I ENFYAE>(ENFY+5)!(ENFYCO>(ENFY+5)),(ENFYAE'<(ENFY+$S(ENFYB="F":6,ENFYB=0:1,1:ENFYB))&(ENFYAE'>(ENFY+$S(ENFYE="F":5,1:ENFYE))))!(ENFYCO'<(ENFY+$S(ENFYB="F":6,ENFYB=0:1,1:ENFYB))&(ENFYCO'>(ENFY+$S(ENFYE="F":5,1:ENFYE)))) D Q
105 . . ; one in future years and one in plan range (adjust count)
106 . . S $P(ENT(ENYR,ENPR),U,4)=$P($G(ENT(ENYR,ENPR)),U,4)-.5
107 Q
108 ;ENPL5D
Note: See TracBrowser for help on using the repository browser.