ENPLV1 ;WISC/SAB-PROJECT VALIDATION, REPORT; 8/27/95
;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
EN ;
; Input Variables
; ENTY type of validation (F, A, R)
; ^TMP($J,"L",project number)=ien^validation code
; ^TMP($J,"V",ien,1,line,0)=TXT error text
; ^TMP($J,"V",ien,2,line,0)=TXT warning text
S %ZIS="Q" D ^%ZIS Q:POP
I $D(IO("Q")) D Q
. S ZTRTN="QEN^ENPLV1",ZTDESC="Invalid Projects"
. S ZTSAVE("^TMP($J,""L"",")="",ZTSAVE("^TMP($J,""V"",")=""
. S ZTSAVE("ENTY")=""
. D ^%ZTLOAD,HOME^%ZIS K ZTSK
QEN ; queued entry
U IO
S (END,ENPG)=0 S Y=$P(DT,".") D DD^%DT S ENDT=Y
S ENDASH="",$P(ENDASH,"-",IOM)="" D HD
S ENPN=""
F S ENPN=$O(^TMP($J,"L",ENPN)) Q:ENPN="" D Q:END
. S ENX=^TMP($J,"L",ENPN),ENDA=$P(ENX,U),ENV=$P(ENX,U,2)
. Q:ENV'<3
. W !,"Project: ",ENPN,$S(ENV=1:" (failed)",1:" (passed with warnings)")
. F ENS=1,2 Q:END D
. . S ENL=0
. . K ^UTILITY($J,"W")
. . F S ENL=$O(^TMP($J,"V",ENDA,ENS,ENL)) Q:'ENL D:$Y+7>IOSL HD Q:END S X=$S(ENS=1:"E",1:"W")_") "_^TMP($J,"V",ENDA,ENS,ENL,0) S DIWL=1,DIWF="WC"_(IOM-5) D ^DIWP D ^DIWW
I 'END W !,?5,"Note: E) = Error which prevents transmission W) = Warning",! I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR
D ^%ZISC
EXIT I $D(ZTQUEUED) S ZTREQ="Q" K ^TMP($J)
K DIR,DIROUT,DIRUT,DIWF,DIWL,DTOUT,DUOUT,X,Y
K END,ENDA,ENDASH,ENDT,ENL,ENPG,ENS,ENV,ENX
Q
HD ; header
W:ENPG !,?5,"Note: E) = Error which prevents transmission W) = Warning",!
I $E(IOST,1,2)="C-",ENPG S DIR(0)="E" D ^DIR K DIR I 'Y S END=1 Q
I $E(IOST,1,2)="C-"!ENPG W @IOF
S ENPG=ENPG+1
W $S(ENTY="F":"Five Year Facility Plan",ENTY="A":"Project Application",ENTY="R":"Progress Report",1:"Misc.")_" Validation Results ",?50,ENDT,?70,"page ",ENPG
W !,ENDASH
I ENPG>1 W !!,"Project: ",ENPN," (continued)"
Q
;ENPLV1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPLV1 1859 printed Nov 22, 2024@17:05:16 Page 2
ENPLV1 ;WISC/SAB-PROJECT VALIDATION, REPORT; 8/27/95
+1 ;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
EN ;
+1 ; Input Variables
+2 ; ENTY type of validation (F, A, R)
+3 ; ^TMP($J,"L",project number)=ien^validation code
+4 ; ^TMP($J,"V",ien,1,line,0)=TXT error text
+5 ; ^TMP($J,"V",ien,2,line,0)=TXT warning text
+6 SET %ZIS="Q"
DO ^%ZIS
if POP
QUIT
+7 IF $DATA(IO("Q"))
Begin DoDot:1
+8 SET ZTRTN="QEN^ENPLV1"
SET ZTDESC="Invalid Projects"
+9 SET ZTSAVE("^TMP($J,""L"",")=""
SET ZTSAVE("^TMP($J,""V"",")=""
+10 SET ZTSAVE("ENTY")=""
+11 DO ^%ZTLOAD
DO HOME^%ZIS
KILL ZTSK
End DoDot:1
QUIT
QEN ; queued entry
+1 USE IO
+2 SET (END,ENPG)=0
SET Y=$PIECE(DT,".")
DO DD^%DT
SET ENDT=Y
+3 SET ENDASH=""
SET $PIECE(ENDASH,"-",IOM)=""
DO HD
+4 SET ENPN=""
+5 FOR
SET ENPN=$ORDER(^TMP($JOB,"L",ENPN))
if ENPN=""
QUIT
Begin DoDot:1
+6 SET ENX=^TMP($JOB,"L",ENPN)
SET ENDA=$PIECE(ENX,U)
SET ENV=$PIECE(ENX,U,2)
+7 if ENV'<3
QUIT
+8 WRITE !,"Project: ",ENPN,$SELECT(ENV=1:" (failed)",1:" (passed with warnings)")
+9 FOR ENS=1,2
if END
QUIT
Begin DoDot:2
+10 SET ENL=0
+11 KILL ^UTILITY($JOB,"W")
+12 FOR
SET ENL=$ORDER(^TMP($JOB,"V",ENDA,ENS,ENL))
if 'ENL
QUIT
if $Y+7>IOSL
DO HD
if END
QUIT
SET X=$SELECT(ENS=1:"E",1:"W")_") "_^TMP($JOB,"V",ENDA,ENS,ENL,0)
SET DIWL=1
SET DIWF="WC"_(IOM-5)
DO ^DIWP
DO ^DIWW
End DoDot:2
End DoDot:1
if END
QUIT
+13 IF 'END
WRITE !,?5,"Note: E) = Error which prevents transmission W) = Warning",!
IF $EXTRACT(IOST,1,2)="C-"
SET DIR(0)="E"
DO ^DIR
KILL DIR
+14 DO ^%ZISC
EXIT IF $DATA(ZTQUEUED)
SET ZTREQ="Q"
KILL ^TMP($JOB)
+1 KILL DIR,DIROUT,DIRUT,DIWF,DIWL,DTOUT,DUOUT,X,Y
+2 KILL END,ENDA,ENDASH,ENDT,ENL,ENPG,ENS,ENV,ENX
+3 QUIT
HD ; header
+1 if ENPG
WRITE !,?5,"Note: E) = Error which prevents transmission W) = Warning",!
+2 IF $EXTRACT(IOST,1,2)="C-"
IF ENPG
SET DIR(0)="E"
DO ^DIR
KILL DIR
IF 'Y
SET END=1
QUIT
+3 IF $EXTRACT(IOST,1,2)="C-"!ENPG
WRITE @IOF
+4 SET ENPG=ENPG+1
+5 WRITE $SELECT(ENTY="F":"Five Year Facility Plan",ENTY="A":"Project Application",ENTY="R":"Progress Report",1:"Misc.")_" Validation Results ",?50,ENDT,?70,"page ",ENPG
+6 WRITE !,ENDASH
+7 IF ENPG>1
WRITE !!,"Project: ",ENPN," (continued)"
+8 QUIT
+9 ;ENPLV1