ENJMUL ;(WASH ISC)/JA-Multiple Stack Driver (Screens) ;5-29-91
;;7.0;ENGINEERING;;Aug 17, 1993
K DJW2,DJK1 G EN3^ENJINJ:X?1"^".N,TK^ENJINJ:X=""!($E(X,1)="^") S:X="@" DJK1=1 S:X=" "!(X="@") X=V(V)
S DJST=DJST+1,^TMP($J,"DJST",DJST,"DA")=V(V,"DA"),^TMP($J,"DJST",DJST,"SC")=$O(^ENG(6910.9,"B",$P(DJJ(V),U,6),0)),^TMP($J,"DJST",DJST-1,"LOC")=V,^TMP($J,"DJST",DJST,"DD")=V(V,"DD"),^TMP($J,"DJST",DJST,"GN")=V(V,"GN")
S ^TMP($J,"DJST",DJST,"FRSC")=DJN,^TMP($J,"DJST",DJST,"DIC")=^TMP($J,"DJST",DJST-1,"DIC")_^TMP($J,"DJST",DJST-1,"DA")_","_V(V,"GN")_","
S DJZ=DJST F DJK=1:1:DJST-1 S DJZ=DJZ-1,DA(DJZ)=^TMP($J,"DJST",DJK,"DA")
S DJNM=$P(^ENG(6910.9,^TMP($J,"DJST",DJST,"SC"),0),U,1),DIC=^TMP($J,"DJST",DJST,"DIC") S:$D(@(DIC_0_")"))=0 @(DIC_0_")")="^"_^TMP($J,"DJST",DJST,"DD")_"^^" K DJDN
S DIC(0)="EQZM" S:'$D(DJDIS) DIC(0)=DIC(0)_"L" X DJCP D ^DIC G D:$D(DJK1) I X["?" X DJCL S:DJ4["S" DJT=DJDD,DJDD=+DJ4,DJY=DJAT,DJAT=.01 D ^ENJINQ:DJ4["S"!(DJ4["D") S:DJ4["S" DJDD=DJT,DJAT=DJY
I Y>0,$P(DJJ(V),U,7)=1 S V(V)=X S @$P(DJJ(V),U,2) X XY W @DJHIN X XY S $P(DJDB," ",DJJ(V)-$L(V(V)))=" " W V(V),DJDB,@DJLIN K DJDB G A
I $Y>23 R !,"Type <CR> to continue",DJZ1:DTIME K DJZ1
I Y>0 D SAVE K V,DJMUL S DA=+Y,DJDN=+Y,^TMP($J,"DJST",DJST,"DA")=DA,@("D"_(DJST-1)_"="_DA) D ^ENJDPL S (W(V),V(V))=DJDN D ^ENJC2 S ^TMP($J,"DJST",DJST-1,"KEY")=V(DJKEY) D EN^ENJINJ S DJW2=1
A S DJN=^TMP($J,"DJST",DJST,"FRSC") S DJST=DJST-1 S DJNM=$P(^ENG(6910.9,DJN,0),"^",1),DIC=^TMP($J,"DJST",DJST,"DIC") S DJDN=^TMP($J,"DJST",DJST,"DA")
K DA S DJZ=DJST I $D(DJW2),DJST>1 F DJK=1:1:DJST-1 S DJZ=DJZ-1,DA(DJZ)=^TMP($J,"DJST",DJK,"DA")
I $D(DJW2),DJST>1 F DJK=0:1:DJST-2 S @("D"_DJK)=^TMP($J,"DJST",DJK+1,"DA")
I $D(DJW2) D REST S V=^TMP($J,"DJST",DJST,"LOC"),V(V)=^TMP($J,"DJST",DJST,"KEY") D ^ENJDPL K DJZ,DJW2 G N
N S DJFF=0,V=^TMP($J,"DJST",DJST,"LOC") G TK^ENJINJ
SAVE S %X="V(",%Y="^TMP($J,""DJ"",DJN," D %XY^%RCR K V Q
REST K V S %X="^TMP($J,""DJ"",DJN,",%Y="V(" D %XY^%RCR Q
D I Y>0 X DJCP W !,"ARE YOU SURE YOU WANT TO DELETE: NO// ",*7 R DJX:10 G:DJX'["Y" D1 S DA=+Y,DR=".01///@" S DIE=DIC D ^DIE K DJK1 S V(V)="" G A
D1 X DJCL W "NOTHING DELETED" G A
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENJMUL 2160 printed Nov 22, 2024@17:04:17 Page 2
ENJMUL ;(WASH ISC)/JA-Multiple Stack Driver (Screens) ;5-29-91
+1 ;;7.0;ENGINEERING;;Aug 17, 1993
+2 KILL DJW2,DJK1
if X?1"^".N
GOTO EN3^ENJINJ
if X=""!($EXTRACT(X,1)="^")
GOTO TK^ENJINJ
if X="@"
SET DJK1=1
if X=" "!(X="@")
SET X=V(V)
+3 SET DJST=DJST+1
SET ^TMP($JOB,"DJST",DJST,"DA")=V(V,"DA")
SET ^TMP($JOB,"DJST",DJST,"SC")=$ORDER(^ENG(6910.9,"B",$PIECE(DJJ(V),U,6),0))
SET ^TMP($JOB,"DJST",DJST-1,"LOC")=V
SET ^TMP($JOB,"DJST",DJST,"DD")=V(V,"DD")
SET ^TMP($JOB,"DJST",DJST,"GN")=V(V,"GN")
+4 SET ^TMP($JOB,"DJST",DJST,"FRSC")=DJN
SET ^TMP($JOB,"DJST",DJST,"DIC")=^TMP($JOB,"DJST",DJST-1,"DIC")_^TMP($JOB,"DJST",DJST-1,"DA")_","_V(V,"GN")_","
+5 SET DJZ=DJST
FOR DJK=1:1:DJST-1
SET DJZ=DJZ-1
SET DA(DJZ)=^TMP($JOB,"DJST",DJK,"DA")
+6 SET DJNM=$PIECE(^ENG(6910.9,^TMP($JOB,"DJST",DJST,"SC"),0),U,1)
SET DIC=^TMP($JOB,"DJST",DJST,"DIC")
if $DATA(@(DIC_0_")"))=0
SET @(DIC_0_")")="^"_^TMP($JOB,"DJST",DJST,"DD")_"^^"
KILL DJDN
+7 SET DIC(0)="EQZM"
if '$DATA(DJDIS)
SET DIC(0)=DIC(0)_"L"
XECUTE DJCP
DO ^DIC
if $DATA(DJK1)
GOTO D
IF X["?"
XECUTE DJCL
if DJ4["S"
SET DJT=DJDD
SET DJDD=+DJ4
SET DJY=DJAT
SET DJAT=.01
if DJ4["S"!(DJ4["D")
DO ^ENJINQ
if DJ4["S"
SET DJDD=DJT
SET DJAT=DJY
+8 IF Y>0
IF $PIECE(DJJ(V),U,7)=1
SET V(V)=X
SET @$PIECE(DJJ(V),U,2)
XECUTE XY
WRITE @DJHIN
XECUTE XY
SET $PIECE(DJDB," ",DJJ(V)-$LENGTH(V(V)))=" "
WRITE V(V),DJDB,@DJLIN
KILL DJDB
GOTO A
+9 IF $Y>23
READ !,"Type <CR> to continue",DJZ1:DTIME
KILL DJZ1
+10 IF Y>0
DO SAVE
KILL V,DJMUL
SET DA=+Y
SET DJDN=+Y
SET ^TMP($JOB,"DJST",DJST,"DA")=DA
SET @("D"_(DJST-1)_"="_DA)
DO ^ENJDPL
SET (W(V),V(V))=DJDN
DO ^ENJC2
SET ^TMP($JOB,"DJST",DJST-1,"KEY")=V(DJKEY)
DO EN^ENJINJ
SET DJW2=1
A SET DJN=^TMP($JOB,"DJST",DJST,"FRSC")
SET DJST=DJST-1
SET DJNM=$PIECE(^ENG(6910.9,DJN,0),"^",1)
SET DIC=^TMP($JOB,"DJST",DJST,"DIC")
SET DJDN=^TMP($JOB,"DJST",DJST,"DA")
+1 KILL DA
SET DJZ=DJST
IF $DATA(DJW2)
IF DJST>1
FOR DJK=1:1:DJST-1
SET DJZ=DJZ-1
SET DA(DJZ)=^TMP($JOB,"DJST",DJK,"DA")
+2 IF $DATA(DJW2)
IF DJST>1
FOR DJK=0:1:DJST-2
SET @("D"_DJK)=^TMP($JOB,"DJST",DJK+1,"DA")
+3 IF $DATA(DJW2)
DO REST
SET V=^TMP($JOB,"DJST",DJST,"LOC")
SET V(V)=^TMP($JOB,"DJST",DJST,"KEY")
DO ^ENJDPL
KILL DJZ,DJW2
GOTO N
N SET DJFF=0
SET V=^TMP($JOB,"DJST",DJST,"LOC")
GOTO TK^ENJINJ
SAVE SET %X="V("
SET %Y="^TMP($J,""DJ"",DJN,"
DO %XY^%RCR
KILL V
QUIT
REST KILL V
SET %X="^TMP($J,""DJ"",DJN,"
SET %Y="V("
DO %XY^%RCR
QUIT
D IF Y>0
XECUTE DJCP
WRITE !,"ARE YOU SURE YOU WANT TO DELETE: NO// ",*7
READ DJX:10
if DJX'["Y"
GOTO D1
SET DA=+Y
SET DR=".01///@"
SET DIE=DIC
DO ^DIE
KILL DJK1
SET V(V)=""
GOTO A
D1 XECUTE DJCL
WRITE "NOTHING DELETED"
GOTO A