ENPLV ;WISC/SAB-PROJECT VALIDATION, VALIDATE LIST ;7/10/95
;;7.0;ENGINEERING;**23**;Aug 17, 1993
EN(ENTY,ENXMIT) ; Validate Projects (entry point with list)
; input variables
; ENTY - type of validation
; ENXMIT - (optional) flag, true for additional transmission checks
; ^TMP($J,"L")=number of projects^current year of FYFP when ENTY="F"
; ^TMP($J,"L",project number)=ien
; output variables
; ^TMP($J,"L")=
; number of projects^current year of FYFP when ENTY="F"^
; number invalid^number valid with warn^number valid (no warn)
; ^TMP($J,"L",project number)=ien^validation code for project
; where validation code = 1 (invalid), 2 (valid w/ warn), 3 (valid)
;
N ENC,ENDA,ENFY,ENPN,ENV
S ENXMIT=$G(ENXMIT)
S (ENC(0),ENC(1),ENC(2),ENC(3))=0
S:ENTY="F" ENFY=$P(^TMP($J,"L"),U,2)
; validate projects
W !,"Validating Projects"
S ENPN=""
F S ENPN=$O(^TMP($J,"L",ENPN)) Q:ENPN="" S ENDA=$P(^(ENPN),U) D ^ENPLV2 S ENC(0)=ENC(0)+1,ENC(ENV)=ENC(ENV)+1,$P(^TMP($J,"L",ENPN),U,2)=ENV W "."
S $P(^TMP($J,"L"),U,3,5)=ENC(1)_U_ENC(2)_U_ENC(3)
; report results
I ENC(3)=ENC(0) W !,"No validation problems found" G EX
I ENC(0)=1 W !,"This project ",$S(ENC(1):"failed",1:"passed")," the validation checks",$S(ENC(1):"",1:" with warnings"),"."
I ENC(0)>1,ENC(1) W !,ENC(1)," out of ",ENC(0)," selected projects failed the validation checks."
I ENC(0)>1,ENC(2) W !,ENC(2)," out of ",ENC(0)," selected projects passed the validation checks with warnings."
S DIR(0)="Y",DIR("A")="Do you want a detailed report",DIR("B")="YES"
D ^DIR K DIR G:$D(DIRUT) EX
I Y D ^ENPLV1
;
EX ; Exit
W !
K ^TMP($J,"V")
K DIC,DIR,DIRUT,DTOUT,DUOUT,DIROUT,X,Y
Q
;ENPLV
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPLV 1735 printed Dec 13, 2024@01:55:07 Page 2
ENPLV ;WISC/SAB-PROJECT VALIDATION, VALIDATE LIST ;7/10/95
+1 ;;7.0;ENGINEERING;**23**;Aug 17, 1993
EN(ENTY,ENXMIT) ; Validate Projects (entry point with list)
+1 ; input variables
+2 ; ENTY - type of validation
+3 ; ENXMIT - (optional) flag, true for additional transmission checks
+4 ; ^TMP($J,"L")=number of projects^current year of FYFP when ENTY="F"
+5 ; ^TMP($J,"L",project number)=ien
+6 ; output variables
+7 ; ^TMP($J,"L")=
+8 ; number of projects^current year of FYFP when ENTY="F"^
+9 ; number invalid^number valid with warn^number valid (no warn)
+10 ; ^TMP($J,"L",project number)=ien^validation code for project
+11 ; where validation code = 1 (invalid), 2 (valid w/ warn), 3 (valid)
+12 ;
+13 NEW ENC,ENDA,ENFY,ENPN,ENV
+14 SET ENXMIT=$GET(ENXMIT)
+15 SET (ENC(0),ENC(1),ENC(2),ENC(3))=0
+16 if ENTY="F"
SET ENFY=$PIECE(^TMP($JOB,"L"),U,2)
+17 ; validate projects
+18 WRITE !,"Validating Projects"
+19 SET ENPN=""
+20 FOR
SET ENPN=$ORDER(^TMP($JOB,"L",ENPN))
if ENPN=""
QUIT
SET ENDA=$PIECE(^(ENPN),U)
DO ^ENPLV2
SET ENC(0)=ENC(0)+1
SET ENC(ENV)=ENC(ENV)+1
SET $PIECE(^TMP($JOB,"L",ENPN),U,2)=ENV
WRITE "."
+21 SET $PIECE(^TMP($JOB,"L"),U,3,5)=ENC(1)_U_ENC(2)_U_ENC(3)
+22 ; report results
+23 IF ENC(3)=ENC(0)
WRITE !,"No validation problems found"
GOTO EX
+24 IF ENC(0)=1
WRITE !,"This project ",$SELECT(ENC(1):"failed",1:"passed")," the validation checks",$SELECT(ENC(1):"",1:" with warnings"),"."
+25 IF ENC(0)>1
IF ENC(1)
WRITE !,ENC(1)," out of ",ENC(0)," selected projects failed the validation checks."
+26 IF ENC(0)>1
IF ENC(2)
WRITE !,ENC(2)," out of ",ENC(0)," selected projects passed the validation checks with warnings."
+27 SET DIR(0)="Y"
SET DIR("A")="Do you want a detailed report"
SET DIR("B")="YES"
+28 DO ^DIR
KILL DIR
if $DATA(DIRUT)
GOTO EX
+29 IF Y
DO ^ENPLV1
+30 ;
EX ; Exit
+1 WRITE !
+2 KILL ^TMP($JOB,"V")
+3 KILL DIC,DIR,DIRUT,DTOUT,DUOUT,DIROUT,X,Y
+4 QUIT
+5 ;ENPLV