ENPRP2 ;(WIRMFO)/DLM/DH/SAB-Project Tracking Report ;3/31/95
;;7.0;ENGINEERING;**28**;Aug 17, 1993
EN ;
N ENFYA,ENMS,ENMSE,ENMSOK,ENQTR,ENX
W !!,"PROJECT",?22,"PERCENT",?35,"PLANNED",?48,"REVISED/",?61,"PREVIOUSLY"
W !,"MILESTONE",?22,"COMPLETE",?33,"QTR",?39,"DATE",?48,"ACTUAL DATE",?61,"REPORTED"
S ENMSOK=$$MSL^ENPRUTL(ENDA)
D MSD^ENPRUTL(ENDA,1)
F ENI=1:1:22 D
. S ENMSE("P")=$$EXTD(ENMS("P",ENI),0)
. S ENMSE("P0")=$$EXTD(ENMS("P0",ENI),0)
. S ENMSE("R")=$$EXTD(ENMS("R",ENI),1)
. S ENMSE("R0")=$$EXTD(ENMS("R0",ENI),1)
. S ENMSE("A")=$$EXTD(ENMS("A",ENI),1)
. S ENMSE("A0")=$$EXTD(ENMS("A0",ENI),1)
. S ENQTR=$$QTR(ENMS("P",ENI))
. W !,$$MS^ENPRUTL(ENI)
. I '$P(ENMSOK,U,ENI) W ?33,"NA",?39,"NA",?48,"NA" Q
. I "^2^8^10^12^21^"[(U_ENI_U) D
. . W ?22 D W^ENPRP1($J(ENMS("%",ENI),3),$J(ENMS("%0",ENI),3),"HP")
. W ?33,ENQTR,?39
. D W^ENPRP1(ENMSE("P"),ENMSE("P0"),$S(ENMSE("P0")]"":"HA",1:""))
. W ?48
. S ENX="",ENX(0)=""
. I ENMSE("A")]"" D
. . S ENX=ENMSE("A")_"A"
. . S ENX(0)=ENMSE("A0")_$S(ENMSE("A0")]"":"A",1:"")
. I ENMSE("A")']"" S ENX=ENMSE("R"),ENX(0)=ENMSE("R0")
. D W^ENPRP1(ENX,ENX(0),"HA")
. I ENX'=ENX(0),ENX(0)]"" W ?61,"("_ENX(0)_")"
. ;I "^6^11^19^"[(U_ENI_U) D
. ;. Q:ENMSE("A")]""
. ;. S ENX=$S(ENI=6:3.45,ENI=11:3.45,ENI=19:3.5,1:"")
. ;. S ENFYA=$$GET1^DIQ(6925,ENDA,ENX)
. ;. S ENX=$S(ENMS("R",ENI)]"":ENMS("R",ENI),1:ENMS("P",ENI))
. ;. S ENX=$E(ENX,1,3)+$E(ENX,4)+1700 ; convert to 4 digit fiscal year
. ;. I ENX'=ENFYA W ?74,"SLIP"
Q
EXTD(ENDT,ENOPT) ; external date
; ENDT - FileMan Date
; ENOPT - 0 for MM-YY or 1 for MM-DD-YY
Q:ENDT="" ""
N ENX
S ENX=$E(ENDT,4,5)_"-"_$S(ENOPT:$E(ENDT,6,7)_"-",1:"")_$E(ENDT,2,3)
Q ENX
QTR(ENDT) ;extract quarter from ENDT FileMan date
Q:ENDT="" ""
N QTR,YEAR
S QTR=+$E(ENDT,4,5),QTR=$P("2^2^2^3^3^3^4^4^4^1^1^1",U,QTR)
S YEAR=$E(ENDT,1,3)+$S(QTR=1:1,1:0),YEAR=$E(YEAR,2,3)
Q YEAR_"."_QTR
;ENPRP2
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPRP2 1966 printed Nov 22, 2024@17:05:33 Page 2
ENPRP2 ;(WIRMFO)/DLM/DH/SAB-Project Tracking Report ;3/31/95
+1 ;;7.0;ENGINEERING;**28**;Aug 17, 1993
EN ;
+1 NEW ENFYA,ENMS,ENMSE,ENMSOK,ENQTR,ENX
+2 WRITE !!,"PROJECT",?22,"PERCENT",?35,"PLANNED",?48,"REVISED/",?61,"PREVIOUSLY"
+3 WRITE !,"MILESTONE",?22,"COMPLETE",?33,"QTR",?39,"DATE",?48,"ACTUAL DATE",?61,"REPORTED"
+4 SET ENMSOK=$$MSL^ENPRUTL(ENDA)
+5 DO MSD^ENPRUTL(ENDA,1)
+6 FOR ENI=1:1:22
Begin DoDot:1
+7 SET ENMSE("P")=$$EXTD(ENMS("P",ENI),0)
+8 SET ENMSE("P0")=$$EXTD(ENMS("P0",ENI),0)
+9 SET ENMSE("R")=$$EXTD(ENMS("R",ENI),1)
+10 SET ENMSE("R0")=$$EXTD(ENMS("R0",ENI),1)
+11 SET ENMSE("A")=$$EXTD(ENMS("A",ENI),1)
+12 SET ENMSE("A0")=$$EXTD(ENMS("A0",ENI),1)
+13 SET ENQTR=$$QTR(ENMS("P",ENI))
+14 WRITE !,$$MS^ENPRUTL(ENI)
+15 IF '$PIECE(ENMSOK,U,ENI)
WRITE ?33,"NA",?39,"NA",?48,"NA"
QUIT
+16 IF "^2^8^10^12^21^"[(U_ENI_U)
Begin DoDot:2
+17 WRITE ?22
DO W^ENPRP1($JUSTIFY(ENMS("%",ENI),3),$JUSTIFY(ENMS("%0",ENI),3),"HP")
End DoDot:2
+18 WRITE ?33,ENQTR,?39
+19 DO W^ENPRP1(ENMSE("P"),ENMSE("P0"),$SELECT(ENMSE("P0")]"":"HA",1:""))
+20 WRITE ?48
+21 SET ENX=""
SET ENX(0)=""
+22 IF ENMSE("A")]""
Begin DoDot:2
+23 SET ENX=ENMSE("A")_"A"
+24 SET ENX(0)=ENMSE("A0")_$SELECT(ENMSE("A0")]"":"A",1:"")
End DoDot:2
+25 IF ENMSE("A")']""
SET ENX=ENMSE("R")
SET ENX(0)=ENMSE("R0")
+26 DO W^ENPRP1(ENX,ENX(0),"HA")
+27 IF ENX'=ENX(0)
IF ENX(0)]""
WRITE ?61,"("_ENX(0)_")"
+28 ;I "^6^11^19^"[(U_ENI_U) D
+29 ;. Q:ENMSE("A")]""
+30 ;. S ENX=$S(ENI=6:3.45,ENI=11:3.45,ENI=19:3.5,1:"")
+31 ;. S ENFYA=$$GET1^DIQ(6925,ENDA,ENX)
+32 ;. S ENX=$S(ENMS("R",ENI)]"":ENMS("R",ENI),1:ENMS("P",ENI))
+33 ;. S ENX=$E(ENX,1,3)+$E(ENX,4)+1700 ; convert to 4 digit fiscal year
+34 ;. I ENX'=ENFYA W ?74,"SLIP"
End DoDot:1
+35 QUIT
EXTD(ENDT,ENOPT) ; external date
+1 ; ENDT - FileMan Date
+2 ; ENOPT - 0 for MM-YY or 1 for MM-DD-YY
+3 if ENDT=""
QUIT ""
+4 NEW ENX
+5 SET ENX=$EXTRACT(ENDT,4,5)_"-"_$SELECT(ENOPT:$EXTRACT(ENDT,6,7)_"-",1:"")_$EXTRACT(ENDT,2,3)
+6 QUIT ENX
QTR(ENDT) ;extract quarter from ENDT FileMan date
+1 if ENDT=""
QUIT ""
+2 NEW QTR,YEAR
+3 SET QTR=+$EXTRACT(ENDT,4,5)
SET QTR=$PIECE("2^2^2^3^3^3^4^4^4^1^1^1",U,QTR)
+4 SET YEAR=$EXTRACT(ENDT,1,3)+$SELECT(QTR=1:1,1:0)
SET YEAR=$EXTRACT(YEAR,2,3)
+5 QUIT YEAR_"."_QTR
+6 ;ENPRP2