ENPL2 ;(WASH ISC)/LKG- CONSTRUCTION PROJ E/E ;7/10/95
;;7.0;ENGINEERING;**23**;Aug 17, 1993
EN ;Entry point for project application Enter/Edit
A ; select and edit project
S DIC="^ENG(""PROJ"",",DIC(0)="AELMQ",DIC("A")="Select PROJECT NUMBER: "
S DLAYGO=6925 D ^DIC K DIC,DO,DLAYGO I $D(DTOUT)!$D(DUOUT)!(Y<1) G EX
S (DA,ENDA)=+Y S:$P(Y,U,3)'=1 ENOLD=1
I $P($G(^ENG("PROJ",ENDA,0)),U,6)="LE" W $C(7),!,"Project Applications are not currently supported for Lease projects." G C
L +^ENG("PROJ",DA):5 E W $C(7),!,"File in Use, Please try later",! G C
S DR="[ENPLI001]",DIE="^ENG(""PROJ""," D ^DIE K DR,DIE G:$D(DTOUT) C
; validate project
I $D(^ENG("PROJ",ENDA,0)) D
. S ^TMP($J,"L")=1,^TMP($J,"L",ENPN)=ENDA
. D EN^ENPLV("A")
. 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,ENCY,ENDA,ENENV,ENFT,ENLY,ENOLD
K ENPC,ENPCI,ENPN,ENPR,ENRY
Q
ACT ;Entry point for Enter/Edit of Project Activation information
S DIC="^ENG(""PROJ"",",DIC(0)="AEMQ",DIC("A")="Select PROJECT NUMBER: "
D ^DIC K DIC,DO
I Y<1!$D(DUOUT)!$D(DTOUT) G EX2
S (DA,ENDA)=+Y
L +^ENG("PROJ",ENDA):5 E W *7,!,"File in Use, Please try later",! G E
S DR="187.5;189;190;188;190.2:190.4",DIE="^ENG(""PROJ""," D ^DIE K DR,DIE
E L -^ENG("PROJ",ENDA) K DA,ENDA,Y
I '$D(DTOUT),'$D(DUOUT) G ACT
EX2 K DA,DIC,DIE,DUOUT,DTOUT,ENDA
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPL2 1452 printed Nov 22, 2024@17:04:48 Page 2
ENPL2 ;(WASH ISC)/LKG- CONSTRUCTION PROJ E/E ;7/10/95
+1 ;;7.0;ENGINEERING;**23**;Aug 17, 1993
EN ;Entry point for project application Enter/Edit
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,DO,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 IF $PIECE($GET(^ENG("PROJ",ENDA,0)),U,6)="LE"
WRITE $CHAR(7),!,"Project Applications are not currently supported for Lease projects."
GOTO C
+5 LOCK +^ENG("PROJ",DA):5
IF '$TEST
WRITE $CHAR(7),!,"File in Use, Please try later",!
GOTO C
+6 SET DR="[ENPLI001]"
SET DIE="^ENG(""PROJ"","
DO ^DIE
KILL DR,DIE
if $DATA(DTOUT)
GOTO C
+7 ; validate project
+8 IF $DATA(^ENG("PROJ",ENDA,0))
Begin DoDot:1
+9 SET ^TMP($JOB,"L")=1
SET ^TMP($JOB,"L",ENPN)=ENDA
+10 DO EN^ENPLV("A")
+11 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,ENCY,ENDA,ENENV,ENFT,ENLY,ENOLD
+2 KILL ENPC,ENPCI,ENPN,ENPR,ENRY
+3 QUIT
ACT ;Entry point for Enter/Edit of Project Activation information
+1 SET DIC="^ENG(""PROJ"","
SET DIC(0)="AEMQ"
SET DIC("A")="Select PROJECT NUMBER: "
+2 DO ^DIC
KILL DIC,DO
+3 IF Y<1!$DATA(DUOUT)!$DATA(DTOUT)
GOTO EX2
+4 SET (DA,ENDA)=+Y
+5 LOCK +^ENG("PROJ",ENDA):5
IF '$TEST
WRITE *7,!,"File in Use, Please try later",!
GOTO E
+6 SET DR="187.5;189;190;188;190.2:190.4"
SET DIE="^ENG(""PROJ"","
DO ^DIE
KILL DR,DIE
E LOCK -^ENG("PROJ",ENDA)
KILL DA,ENDA,Y
+1 IF '$DATA(DTOUT)
IF '$DATA(DUOUT)
GOTO ACT
EX2 KILL DA,DIC,DIE,DUOUT,DTOUT,ENDA
+1 QUIT