Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ENPLV

ENPLV.m

Go to the documentation of this file.
  1. ENPLV ;WISC/SAB-PROJECT VALIDATION, VALIDATE LIST ;7/10/95
  1. ;;7.0;ENGINEERING;**23**;Aug 17, 1993
  1. EN(ENTY,ENXMIT) ; Validate Projects (entry point with list)
  1. ; input variables
  1. ; ENTY - type of validation
  1. ; ENXMIT - (optional) flag, true for additional transmission checks
  1. ; ^TMP($J,"L")=number of projects^current year of FYFP when ENTY="F"
  1. ; ^TMP($J,"L",project number)=ien
  1. ; output variables
  1. ; ^TMP($J,"L")=
  1. ; number of projects^current year of FYFP when ENTY="F"^
  1. ; number invalid^number valid with warn^number valid (no warn)
  1. ; ^TMP($J,"L",project number)=ien^validation code for project
  1. ; where validation code = 1 (invalid), 2 (valid w/ warn), 3 (valid)
  1. ;
  1. N ENC,ENDA,ENFY,ENPN,ENV
  1. S ENXMIT=$G(ENXMIT)
  1. S (ENC(0),ENC(1),ENC(2),ENC(3))=0
  1. S:ENTY="F" ENFY=$P(^TMP($J,"L"),U,2)
  1. ; validate projects
  1. W !,"Validating Projects"
  1. S ENPN=""
  1. 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 "."
  1. S $P(^TMP($J,"L"),U,3,5)=ENC(1)_U_ENC(2)_U_ENC(3)
  1. ; report results
  1. I ENC(3)=ENC(0) W !,"No validation problems found" G EX
  1. I ENC(0)=1 W !,"This project ",$S(ENC(1):"failed",1:"passed")," the validation checks",$S(ENC(1):"",1:" with warnings"),"."
  1. I ENC(0)>1,ENC(1) W !,ENC(1)," out of ",ENC(0)," selected projects failed the validation checks."
  1. I ENC(0)>1,ENC(2) W !,ENC(2)," out of ",ENC(0)," selected projects passed the validation checks with warnings."
  1. S DIR(0)="Y",DIR("A")="Do you want a detailed report",DIR("B")="YES"
  1. D ^DIR K DIR G:$D(DIRUT) EX
  1. I Y D ^ENPLV1
  1. ;
  1. EX ; Exit
  1. W !
  1. K ^TMP($J,"V")
  1. K DIC,DIR,DIRUT,DTOUT,DUOUT,DIROUT,X,Y
  1. Q
  1. ;ENPLV