ENMAN ;WIRMFO/DH,SAB-Engineering Package Management ; 5/31/12 2:17pm
;;7.0;ENGINEERING;**35,91**;Aug 17, 1993;Build 9
;
HDR W @IOF,!!,?15,"ENGINEERING PROGRAM MANAGEMENT ROUTINE",!! Q
;END OF CANNED MENU PROGRAM
INIT G:$D(^XUSEC("ENMGR",DUZ)) HDR W !!,$C(7),"Sorry, but you lack the necessary SECURITY KEY!",! S XQUIT=1 Q
PORT ;COMPUTER PORT EDIT
S (DIC,DIE)="^DIC(6910.1,",DIC(0)="AEQLM",DLAYGO=6910 D FMUT
K DLAYGO
G EXIT
SEC ;Engineering shops
S DIC="^DIC(6922,",DIC(0)="AEQLM",DLAYGO=6922
D ^DIC K DLAYGO Q:Y'>0 S (DA,ENDA)=+Y
L +^DIC(6922,DA):$G(DILOCKTM,3) I '$T W !,*7,"Another user is editing this entry. Please try again later." Q
S DIE="^DIC(6922,",DR=".01;1;2;4;5"
D ^DIE
L -^DIC(6922,ENDA) K ENDA
Q
;
WCC ;WORK CENTER CODE
S (DIC,DIE)="^DIC(6921,",DIC(0)="AEQLM",DLAYGO=6921 D FMUT
K DLAYGO
G EXIT
EMP ;EMPLOYEE ENTER/EDIT
S (DIC,DIE)="^ENG(""EMP"",",DIC(0)="AEQLM",DLAYGO=6929 D FMUT
K DLAYGO
G EXIT
MAN ;MANUFACTURE EDIT
S (DIC,DIE)="^ENG(""MFG"",",DIC(0)="AEQLM",DLAYGO=6912 D FMUT
K DLAYGO
G EXIT
FMUT ;FILE MANAGER UTILITY HANDLER
K DA S ENDIC(0)=DIC(0),ENDIC=DIC
FMUT1 S DIC(0)=ENDIC(0),DIC=$G(ENDIC) D ^DIC S (DA,ENDA)=+Y Q:DA'>0 D LOCK G:ENL=0 FMUT S DR=".01:99" D ^DIE L -@(ENDIC_ENDA_")") W !! G FMUT1
LOCK ;LOCK GLOBAL THAT IS BEING ACCESSED BY ANOTHER USER
S X=DIC_DA_")" L +@X:$G(DILOCKTM,3) S ENL=$T Q:ENL'=0 I ENL=0 W !!,$C(7),"THIS ENTRY IS BEING EDITED BY ANOTHER USER. TRY LATER." Q
EXIT K ENL,DIC,DIE,DA,DR,N,I,J,K,O,S,X,Y,ENDA,ENDIC
Q
;ENMAN
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENMAN 1545 printed Oct 16, 2024@17:55:17 Page 2
ENMAN ;WIRMFO/DH,SAB-Engineering Package Management ; 5/31/12 2:17pm
+1 ;;7.0;ENGINEERING;**35,91**;Aug 17, 1993;Build 9
+2 ;
HDR WRITE @IOF,!!,?15,"ENGINEERING PROGRAM MANAGEMENT ROUTINE",!!
QUIT
+1 ;END OF CANNED MENU PROGRAM
INIT if $DATA(^XUSEC("ENMGR",DUZ))
GOTO HDR
WRITE !!,$CHAR(7),"Sorry, but you lack the necessary SECURITY KEY!",!
SET XQUIT=1
QUIT
PORT ;COMPUTER PORT EDIT
+1 SET (DIC,DIE)="^DIC(6910.1,"
SET DIC(0)="AEQLM"
SET DLAYGO=6910
DO FMUT
+2 KILL DLAYGO
+3 GOTO EXIT
SEC ;Engineering shops
+1 SET DIC="^DIC(6922,"
SET DIC(0)="AEQLM"
SET DLAYGO=6922
+2 DO ^DIC
KILL DLAYGO
if Y'>0
QUIT
SET (DA,ENDA)=+Y
+3 LOCK +^DIC(6922,DA):$GET(DILOCKTM,3)
IF '$TEST
WRITE !,*7,"Another user is editing this entry. Please try again later."
QUIT
+4 SET DIE="^DIC(6922,"
SET DR=".01;1;2;4;5"
+5 DO ^DIE
+6 LOCK -^DIC(6922,ENDA)
KILL ENDA
+7 QUIT
+8 ;
WCC ;WORK CENTER CODE
+1 SET (DIC,DIE)="^DIC(6921,"
SET DIC(0)="AEQLM"
SET DLAYGO=6921
DO FMUT
+2 KILL DLAYGO
+3 GOTO EXIT
EMP ;EMPLOYEE ENTER/EDIT
+1 SET (DIC,DIE)="^ENG(""EMP"","
SET DIC(0)="AEQLM"
SET DLAYGO=6929
DO FMUT
+2 KILL DLAYGO
+3 GOTO EXIT
MAN ;MANUFACTURE EDIT
+1 SET (DIC,DIE)="^ENG(""MFG"","
SET DIC(0)="AEQLM"
SET DLAYGO=6912
DO FMUT
+2 KILL DLAYGO
+3 GOTO EXIT
FMUT ;FILE MANAGER UTILITY HANDLER
+1 KILL DA
SET ENDIC(0)=DIC(0)
SET ENDIC=DIC
FMUT1 SET DIC(0)=ENDIC(0)
SET DIC=$GET(ENDIC)
DO ^DIC
SET (DA,ENDA)=+Y
if DA'>0
QUIT
DO LOCK
if ENL=0
GOTO FMUT
SET DR=".01:99"
DO ^DIE
LOCK -@(ENDIC_ENDA_")")
WRITE !!
GOTO FMUT1
LOCK ;LOCK GLOBAL THAT IS BEING ACCESSED BY ANOTHER USER
+1 SET X=DIC_DA_")"
LOCK +@X:$GET(DILOCKTM,3)
SET ENL=$TEST
if ENL'=0
QUIT
IF ENL=0
WRITE !!,$CHAR(7),"THIS ENTRY IS BEING EDITED BY ANOTHER USER. TRY LATER."
QUIT
EXIT KILL ENL,DIC,DIE,DA,DR,N,I,J,K,O,S,X,Y,ENDA,ENDIC
+1 QUIT
+2 ;ENMAN