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

ENMAN.m

Go to the documentation of this file.
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