ENSP ;(WASH ISC)/WDS@Charleston-Space File Driver ; 5/31/12 2:28pm
;;7.0;ENGINEERING;**91**;Aug 17, 1993;Build 9
;
V D:'$D(DT) DT^DICRW S U="^",S=";",O=$T(OPT) I $D(^DOPT($P(O,S,5),"VERSION")),($P($T(V),S,3)=^DOPT($P(O,S,5),"VERSION")) G IN
K ^DOPT($P(O,S,5))
F I=1:1 Q:$T(OPT+I)="" S ^DOPT($P(O,S,5),I,0)=$P($T(OPT+I),S,3),^DOPT($P(O,S,5),"B",$P($P($T(OPT+I),S,3),"^",1),I)=""
S K=I-1,^DOPT($P(O,S,5),0)=$P(O,S,4)_U_1_U_K_U_K K I,K,X S ^DOPT($P(O,S,5),"VERSION")=$P($T(V),S,3)
IN I $P(O,S,6)'="" D @($P(O,S,6))
PR S O=$T(OPT),S=";" S IOP="HOME" D ^%ZIS W:IOST'["PK-" @IOF K IOP
D HDR F J=1:1 Q:'$D(^DOPT($P(O,S,5),J,0)) W !,?15,J,". ",$P(^DOPT($P(O,S,5),J,0),U,1)
RE W ! S DIC("A")="Select "_$P($T(OPT),S,4)_": EXIT// ",DIC="^DOPT("_""""_$P($T(OPT),S,5)_""""_",",DIC(0)="AEQMN" D ^DIC G:X=""!(X=U) EXIT G:Y<0 RE K DIC,J,O D @($P($T(OPT+Y),S,4)) G PR
HDR W @IOF,!!,?18,"ENGINEERING SPACE/FACILITY MANAGEMENT",!
Q
SP ;Room enter/edit
W !! S (DIC,DIE)="^ENG(""SP"",",DR=$S($D(^DIE("B","ENZSPENTER")):"[ENZSPENTER]",1:"[ENSPENTER]")
S DIC(0)="AEQLM",DLAYGO=6928 D FMUT
K DLAYGO
G EXIT
;
EMKY ;RECORD KEY DISTRIBUTION
W !! S (DIC,DIE)="^ENG(""KEY"",",DIC(0)="AEQLM",DLAYGO=6926
D FMUT
K DLAYGO
G EXIT
;
KLOCK ;LOCK/KEY NUMBER DISTRIBUTION
W !! S DR=".01:2",(DIC,DIE)="^ENG(""LK"",",DIC(0)="AEQLM",DLAYGO=6927
D FMUT
K DLAYGO
G EXIT
;
PREMP ;PRINT LIST OF EMPLOYEES WITH KEYS
S L="0",DIC="^ENG(""KEY"",",FLDS="[ENSPPREMP]",BY=".01" G PRINT
PRSRV ;PRINT LIST OF EMPLOYEES BY SERVICE
S DHD="Service Key Holders by Employee Name"
S L="0",DIC="^ENG(""KEY"",",FLDS="[ENSPPREMP]",BY="#.4,.01" G PRINT
PRKEY ;PRINT LIST OF KEYS WITH EMPLOYEES
S L="0",DIC="^ENG(""LK"",",FLDS="[ENSPPRKEY]",BY=".01" G PRINT
PRRM ;Print ROOMS
D SET S BY=".5,.01" S:ENMULT BY=".6,"_BY D FLDS^ENSP1 G PRINT
PRSER ;Rooms by SERVICE
D SET S DHD="ENGINEERING SPACE INVENTORY BY OWNING SERVICE",BY=".5,+1.5,@.01" S:ENMULT BY=".6,"_BY D FLDS^ENSP1 D SUM G PRINT
PRFUNC ;Rooms by FUNCTION
D SET S DHD="ENGINEERING SPACE INVENTORY BY ROOM FUNCTION",BY=".5,+2.6,@.01" S:ENMULT BY=".6,"_BY D FLDS^ENSP1 D SUM G PRINT
PRBLDG ;Space Survey by BUILDING
D SET S DHD="ENGINEERING SPACE INVENTORY BY BUILDING",BY="+.5,@.01" S:ENMULT BY=".6,"_BY D FLDS^ENSP1 D SUM G PRINT
PR144 ;PRINT RCS 14-4 REPORTABLE SPACE
D SET S DHD="RCS 14-4 REPORTABLE SPACE SORTED BY SERVICE",FLDS="[ENSPR144]"
I ENMULT S BY="16,.6,.5,+1.5;S1",FR="YES,?,?,?",TO="YESZ,?,?,?"
E S BY="16,.5,+1.5;S1",FR="YES,?,?",TO="YESZ,?,?"
G PRINT
;
PR137 ;BLDG MNGT (137) AMIS REPORT
D SET S DHD="BUILDING MANAGEMENT AMIS REPORT, RCS 10-203",BY="+15;S1",FLDS="[ENSPR144]" G PRINT
;
PRFRS ;PRINT REPORT OF FINISH REPLACEMENT SCHEDULE
FRS1 ;Ceiling
S X=1 G FRS
FRS2 ;Wall
S X=2 G FRS
FRS3 ;Floor
S X=3 G FRS
FRS4 ;All finishes
S X=4 G FRS
FRS S L="0",DIC="^ENG(""SP"",",DHD="ROOM FINISH REPLACEMENT SCHEDULE",FLDS=$S(X=1:"[ENSPFRDCEILING]",X=2:"[ENSPFRDWALL]",X=3:"[ENSPFRDFLOOR]",X=4:"[ENSPFRD]"),BY=$S(X=1:"9.5",X=2:"7.5",X=3:"8.5",X=4:".01") G PRINT
;
SET S L="0",DIC="^ENG(""SP"",",ENMULT=0 K FR,TO
S N=$O(^DIC(6910,0)) I N>0,$P(^DIC(6910,N,0),U,10) S ENMULT=1
Q
;
SUM W !!,"Want just a net square foot and room count summary" S %=2 D YN^DICN G:%=0 SUM I %=1 S FLDS="+4.5"
Q
;
FUNC ;FUNCTION FILE EDIT
W !! S (DIC,DIE)="^ENG(6928.1,",DIC(0)="AEQLM",DLAYGO=6928
D FMUT
K DLAYGO
G EXIT
;
UTL ;UTILITIES FILE EDIT
W !! S (DIC,DIE)="^ENG(6928.2,",DIC(0)="AEQLM",DLAYGO=6928
D FMUT
K DLAYGO
G EXIT
;
PRINT I $D(%) Q:%<0
S DIOEND="I IOST[""C-"" R !!,""Press <RETURN> to continue"",X:DTIME" D EN1^DIP
G EXIT
FMUT ;FILEMAN UTILITY
S ENDIC(0)=DIC(0),ENDIC=DIC
FMUT1 S DIC(0)=ENDIC(0),DIC=$G(ENDIC) D ^DIC Q:Y'>0 S (DA,ENLOCK)=+Y D LOCK G:ENL=0 FMUT S:$D(DR)=0 DR=".01:99" D ^DIE L -@(ENDIC_ENLOCK_")") W !! G FMUT1
LOCK ;Lock record being edited
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 A,BY,C,DIC,DIE,DA,DP,DR,D0,ENL,FLDS,FR,I,IOP,J,K,L,O,S,TO,X,Y,%DT,ENLOCK,ENMULT,ENDIC
Q
;ENSP
OPT ;;ENGINEERING SPACE/FACILITY MANAGEMENT;SPACE MANAGEMENT OPTION;ENSP;
;;ENTER NEW ROOM SPACE DATA;SP
;;DISPLAY/EDIT ROOM DATA;ENT^ENSP2
;;KEY DISTRIBUTION BY EMPLOYEE ENTER/EDIT;EMKY
;;LOCK NUMBER FILE ENTER/EDIT;KLOCK
;;PRINT KEY DISTRIBUTION BY EMPLOYEE;PREMP
;;PRINT KEY DISTRIBUTION BY SERVICE;PRSRV
;;EMPLOYEE LIST BY KEY REPORT;PRKEY
;;SPACE SURVEY REPORT MENU;^ENSP2
;;REPLACEMENT SCHEDULE FOR ALL FINISHES;FRS4
;;CEILING REPLACEMENT SCHEDULE;FRS1
;;WALL REPLACEMENT SCHEDULE;FRS2
;;FLOOR REPLACEMENT SCHEDULE;FRS3
;;EDIT FUNCTION FILE;FUNC
;;EDIT UTILITIES FILE;UTL
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENSP 4762 printed Dec 13, 2024@01:55:38 Page 2
ENSP ;(WASH ISC)/WDS@Charleston-Space File Driver ; 5/31/12 2:28pm
+1 ;;7.0;ENGINEERING;**91**;Aug 17, 1993;Build 9
+2 ;
V if '$DATA(DT)
DO DT^DICRW
SET U="^"
SET S=";"
SET O=$TEXT(OPT)
IF $DATA(^DOPT($PIECE(O,S,5),"VERSION"))
IF ($PIECE($TEXT(V),S,3)=^DOPT($PIECE(O,S,5),"VERSION"))
GOTO IN
+1 KILL ^DOPT($PIECE(O,S,5))
+2 FOR I=1:1
if $TEXT(OPT+I)=""
QUIT
SET ^DOPT($PIECE(O,S,5),I,0)=$PIECE($TEXT(OPT+I),S,3)
SET ^DOPT($PIECE(O,S,5),"B",$PIECE($PIECE($TEXT(OPT+I),S,3),"^",1),I)=""
+3 SET K=I-1
SET ^DOPT($PIECE(O,S,5),0)=$PIECE(O,S,4)_U_1_U_K_U_K
KILL I,K,X
SET ^DOPT($PIECE(O,S,5),"VERSION")=$PIECE($TEXT(V),S,3)
IN IF $PIECE(O,S,6)'=""
DO @($PIECE(O,S,6))
PR SET O=$TEXT(OPT)
SET S=";"
SET IOP="HOME"
DO ^%ZIS
if IOST'["PK-"
WRITE @IOF
KILL IOP
+1 DO HDR
FOR J=1:1
if '$DATA(^DOPT($PIECE(O,S,5),J,0))
QUIT
WRITE !,?15,J,". ",$PIECE(^DOPT($PIECE(O,S,5),J,0),U,1)
RE WRITE !
SET DIC("A")="Select "_$PIECE($TEXT(OPT),S,4)_": EXIT// "
SET DIC="^DOPT("_""""_$PIECE($TEXT(OPT),S,5)_""""_","
SET DIC(0)="AEQMN"
DO ^DIC
if X=""!(X=U)
GOTO EXIT
if Y<0
GOTO RE
KILL DIC,J,O
DO @($PIECE($TEXT(OPT+Y),S,4))
GOTO PR
HDR WRITE @IOF,!!,?18,"ENGINEERING SPACE/FACILITY MANAGEMENT",!
+1 QUIT
SP ;Room enter/edit
+1 WRITE !!
SET (DIC,DIE)="^ENG(""SP"","
SET DR=$SELECT($DATA(^DIE("B","ENZSPENTER")):"[ENZSPENTER]",1:"[ENSPENTER]")
+2 SET DIC(0)="AEQLM"
SET DLAYGO=6928
DO FMUT
+3 KILL DLAYGO
+4 GOTO EXIT
+5 ;
EMKY ;RECORD KEY DISTRIBUTION
+1 WRITE !!
SET (DIC,DIE)="^ENG(""KEY"","
SET DIC(0)="AEQLM"
SET DLAYGO=6926
+2 DO FMUT
+3 KILL DLAYGO
+4 GOTO EXIT
+5 ;
KLOCK ;LOCK/KEY NUMBER DISTRIBUTION
+1 WRITE !!
SET DR=".01:2"
SET (DIC,DIE)="^ENG(""LK"","
SET DIC(0)="AEQLM"
SET DLAYGO=6927
+2 DO FMUT
+3 KILL DLAYGO
+4 GOTO EXIT
+5 ;
PREMP ;PRINT LIST OF EMPLOYEES WITH KEYS
+1 SET L="0"
SET DIC="^ENG(""KEY"","
SET FLDS="[ENSPPREMP]"
SET BY=".01"
GOTO PRINT
PRSRV ;PRINT LIST OF EMPLOYEES BY SERVICE
+1 SET DHD="Service Key Holders by Employee Name"
+2 SET L="0"
SET DIC="^ENG(""KEY"","
SET FLDS="[ENSPPREMP]"
SET BY="#.4,.01"
GOTO PRINT
PRKEY ;PRINT LIST OF KEYS WITH EMPLOYEES
+1 SET L="0"
SET DIC="^ENG(""LK"","
SET FLDS="[ENSPPRKEY]"
SET BY=".01"
GOTO PRINT
PRRM ;Print ROOMS
+1 DO SET
SET BY=".5,.01"
if ENMULT
SET BY=".6,"_BY
DO FLDS^ENSP1
GOTO PRINT
PRSER ;Rooms by SERVICE
+1 DO SET
SET DHD="ENGINEERING SPACE INVENTORY BY OWNING SERVICE"
SET BY=".5,+1.5,@.01"
if ENMULT
SET BY=".6,"_BY
DO FLDS^ENSP1
DO SUM
GOTO PRINT
PRFUNC ;Rooms by FUNCTION
+1 DO SET
SET DHD="ENGINEERING SPACE INVENTORY BY ROOM FUNCTION"
SET BY=".5,+2.6,@.01"
if ENMULT
SET BY=".6,"_BY
DO FLDS^ENSP1
DO SUM
GOTO PRINT
PRBLDG ;Space Survey by BUILDING
+1 DO SET
SET DHD="ENGINEERING SPACE INVENTORY BY BUILDING"
SET BY="+.5,@.01"
if ENMULT
SET BY=".6,"_BY
DO FLDS^ENSP1
DO SUM
GOTO PRINT
PR144 ;PRINT RCS 14-4 REPORTABLE SPACE
+1 DO SET
SET DHD="RCS 14-4 REPORTABLE SPACE SORTED BY SERVICE"
SET FLDS="[ENSPR144]"
+2 IF ENMULT
SET BY="16,.6,.5,+1.5;S1"
SET FR="YES,?,?,?"
SET TO="YESZ,?,?,?"
+3 IF '$TEST
SET BY="16,.5,+1.5;S1"
SET FR="YES,?,?"
SET TO="YESZ,?,?"
+4 GOTO PRINT
+5 ;
PR137 ;BLDG MNGT (137) AMIS REPORT
+1 DO SET
SET DHD="BUILDING MANAGEMENT AMIS REPORT, RCS 10-203"
SET BY="+15;S1"
SET FLDS="[ENSPR144]"
GOTO PRINT
+2 ;
PRFRS ;PRINT REPORT OF FINISH REPLACEMENT SCHEDULE
FRS1 ;Ceiling
+1 SET X=1
GOTO FRS
FRS2 ;Wall
+1 SET X=2
GOTO FRS
FRS3 ;Floor
+1 SET X=3
GOTO FRS
FRS4 ;All finishes
+1 SET X=4
GOTO FRS
FRS SET L="0"
SET DIC="^ENG(""SP"","
SET DHD="ROOM FINISH REPLACEMENT SCHEDULE"
SET FLDS=$SELECT(X=1:"[ENSPFRDCEILING]",X=2:"[ENSPFRDWALL]",X=3:"[ENSPFRDFLOOR]",X=4:"[ENSPFRD]")
SET BY=$SELECT(X=1:"9.5",X=2:"7.5",X=3:"8.5",X=4:".01")
GOTO PRINT
+1 ;
SET SET L="0"
SET DIC="^ENG(""SP"","
SET ENMULT=0
KILL FR,TO
+1 SET N=$ORDER(^DIC(6910,0))
IF N>0
IF $PIECE(^DIC(6910,N,0),U,10)
SET ENMULT=1
+2 QUIT
+3 ;
SUM WRITE !!,"Want just a net square foot and room count summary"
SET %=2
DO YN^DICN
if %=0
GOTO SUM
IF %=1
SET FLDS="+4.5"
+1 QUIT
+2 ;
FUNC ;FUNCTION FILE EDIT
+1 WRITE !!
SET (DIC,DIE)="^ENG(6928.1,"
SET DIC(0)="AEQLM"
SET DLAYGO=6928
+2 DO FMUT
+3 KILL DLAYGO
+4 GOTO EXIT
+5 ;
UTL ;UTILITIES FILE EDIT
+1 WRITE !!
SET (DIC,DIE)="^ENG(6928.2,"
SET DIC(0)="AEQLM"
SET DLAYGO=6928
+2 DO FMUT
+3 KILL DLAYGO
+4 GOTO EXIT
+5 ;
PRINT IF $DATA(%)
if %<0
QUIT
+1 SET DIOEND="I IOST[""C-"" R !!,""Press <RETURN> to continue"",X:DTIME"
DO EN1^DIP
+2 GOTO EXIT
FMUT ;FILEMAN UTILITY
+1 SET ENDIC(0)=DIC(0)
SET ENDIC=DIC
FMUT1 SET DIC(0)=ENDIC(0)
SET DIC=$GET(ENDIC)
DO ^DIC
if Y'>0
QUIT
SET (DA,ENLOCK)=+Y
DO LOCK
if ENL=0
GOTO FMUT
if $DATA(DR)=0
SET DR=".01:99"
DO ^DIE
LOCK -@(ENDIC_ENLOCK_")")
WRITE !!
GOTO FMUT1
LOCK ;Lock record being edited
+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
+2 ;
EXIT KILL A,BY,C,DIC,DIE,DA,DP,DR,D0,ENL,FLDS,FR,I,IOP,J,K,L,O,S,TO,X,Y,%DT,ENLOCK,ENMULT,ENDIC
+1 QUIT
+2 ;ENSP
OPT ;;ENGINEERING SPACE/FACILITY MANAGEMENT;SPACE MANAGEMENT OPTION;ENSP;
+1 ;;ENTER NEW ROOM SPACE DATA;SP
+2 ;;DISPLAY/EDIT ROOM DATA;ENT^ENSP2
+3 ;;KEY DISTRIBUTION BY EMPLOYEE ENTER/EDIT;EMKY
+4 ;;LOCK NUMBER FILE ENTER/EDIT;KLOCK
+5 ;;PRINT KEY DISTRIBUTION BY EMPLOYEE;PREMP
+6 ;;PRINT KEY DISTRIBUTION BY SERVICE;PRSRV
+7 ;;EMPLOYEE LIST BY KEY REPORT;PRKEY
+8 ;;SPACE SURVEY REPORT MENU;^ENSP2
+9 ;;REPLACEMENT SCHEDULE FOR ALL FINISHES;FRS4
+10 ;;CEILING REPLACEMENT SCHEDULE;FRS1
+11 ;;WALL REPLACEMENT SCHEDULE;FRS2
+12 ;;FLOOR REPLACEMENT SCHEDULE;FRS3
+13 ;;EDIT FUNCTION FILE;FUNC
+14 ;;EDIT UTILITIES FILE;UTL