ENPL4 ;(WASH ISC)/LKG- 5-YR PLAN CONSTRUCTION PROJ E/E ;7/10/95
;;7.0;ENGINEERING;**23**;Aug 17, 1993
EN ;Entry point for editing 5-Yr Plan project.
; Determine budget year of plan to avoid inappropriate questions
; for out-year projects and support validation checks.
S DIR(0)="N^1995:2099:0",DIR("A")="Budget Year of 5-Yr Plan"
S DIR("B")=1700+$E(DT,1,3)+$S($E(DT,4,7)>0600:2,1:1)
S DIR("?",1)="Enter a Fiscal Year between 1995 and 2099"
S DIR("?",2)="Note: This is the Plan's, not the Project's Budget Year"
S DIR("?")="This year enables differentiation among current, budget and out year projects"
D ^DIR K DIR G:$D(DIRUT) EX S ENBY=Y
A ; select and edit project
S DIC="^ENG(""PROJ"",",DIC(0)="AELMQ",DIC("A")="Select PROJECT NUMBER: "
S DLAYGO=6925 D ^DIC K DIC,DLAYGO I $D(DTOUT)!$D(DUOUT)!(Y<1) G EX
S (DA,ENDA)=+Y S:$P(Y,U,3)'=1 ENOLD=1
L +^ENG("PROJ",DA):5 E W *7,!,"File in Use, Please try later",! G C
S DR="[ENPLI002]",DIE="^ENG(""PROJ""," D ^DIE K DIE,DR G:$D(DTOUT) C
; validate project
I $D(^ENG("PROJ",ENDA,0)) D
. S ^TMP($J,"L")=1_U_(ENBY-1),^TMP($J,"L",ENPN)=ENDA
. D EN^ENPLV("F")
. K ^TMP($J,"L")
C L -^ENG("PROJ",ENDA)
K DA,ENDA,ENOLD
I '$D(DTOUT),'$D(DUOUT) G A
EX K DA,DIC,DIE,DIROUT,DIRUT,DR,DUOUT,DTOUT,X,Y
K ENAY,ENBC,ENBCI,ENBO,ENBOI,ENBY,ENCY,ENDA,ENFT,ENLY,ENOL
K ENPC,ENPCI,ENPN,ENPR,ENRY
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPL4 1375 printed Nov 22, 2024@17:04:52 Page 2
ENPL4 ;(WASH ISC)/LKG- 5-YR PLAN CONSTRUCTION PROJ E/E ;7/10/95
+1 ;;7.0;ENGINEERING;**23**;Aug 17, 1993
EN ;Entry point for editing 5-Yr Plan project.
+1 ; Determine budget year of plan to avoid inappropriate questions
+2 ; for out-year projects and support validation checks.
+3 SET DIR(0)="N^1995:2099:0"
SET DIR("A")="Budget Year of 5-Yr Plan"
+4 SET DIR("B")=1700+$EXTRACT(DT,1,3)+$SELECT($EXTRACT(DT,4,7)>0600:2,1:1)
+5 SET DIR("?",1)="Enter a Fiscal Year between 1995 and 2099"
+6 SET DIR("?",2)="Note: This is the Plan's, not the Project's Budget Year"
+7 SET DIR("?")="This year enables differentiation among current, budget and out year projects"
+8 DO ^DIR
KILL DIR
if $DATA(DIRUT)
GOTO EX
SET ENBY=Y
A ; select and edit project
+1 SET DIC="^ENG(""PROJ"","
SET DIC(0)="AELMQ"
SET DIC("A")="Select PROJECT NUMBER: "
+2 SET DLAYGO=6925
DO ^DIC
KILL DIC,DLAYGO
IF $DATA(DTOUT)!$DATA(DUOUT)!(Y<1)
GOTO EX
+3 SET (DA,ENDA)=+Y
if $PIECE(Y,U,3)'=1
SET ENOLD=1
+4 LOCK +^ENG("PROJ",DA):5
IF '$TEST
WRITE *7,!,"File in Use, Please try later",!
GOTO C
+5 SET DR="[ENPLI002]"
SET DIE="^ENG(""PROJ"","
DO ^DIE
KILL DIE,DR
if $DATA(DTOUT)
GOTO C
+6 ; validate project
+7 IF $DATA(^ENG("PROJ",ENDA,0))
Begin DoDot:1
+8 SET ^TMP($JOB,"L")=1_U_(ENBY-1)
SET ^TMP($JOB,"L",ENPN)=ENDA
+9 DO EN^ENPLV("F")
+10 KILL ^TMP($JOB,"L")
End DoDot:1
C LOCK -^ENG("PROJ",ENDA)
+1 KILL DA,ENDA,ENOLD
+2 IF '$DATA(DTOUT)
IF '$DATA(DUOUT)
GOTO A
EX KILL DA,DIC,DIE,DIROUT,DIRUT,DR,DUOUT,DTOUT,X,Y
+1 KILL ENAY,ENBC,ENBCI,ENBO,ENBOI,ENBY,ENCY,ENDA,ENFT,ENLY,ENOL
+2 KILL ENPC,ENPCI,ENPN,ENPR,ENRY
+3 QUIT