XULMP ;IRMFO-ALB/CJM/SWO/RGG - KERNEL LOCK MANAGER ;12/01/2012
;;8.0;KERNEL;**608**;JUL 10, 1995;Build 84
;;Per VA Directive 6402, this routine should not be modified
;
; ******************************************************************
; * *
; * The Kernel Lock Manager is based on the VistA Lock Manager *
; * developed by Tommy Martin. *
; * *
; ******************************************************************
;Setting up parameters
;
GETPARMS(PARMS,ERROR) ;
;
K PARMS
S ERROR=""
D
.N IEN,NODE,SUB,COUNT
.S IEN=$O(^XLM(8993.1,0))
.I 'IEN S ERROR="Parameter file not setup" Q
.S NODE=$G(^XLM(8993.1,IEN,0))
.S PARMS("ON?")=$S($P(NODE,"^",2)="e":1,1:0)
.S PARMS("PRODUCTION?")=$$PROD^XUPROD()
.S (COUNT,SUB)=0
.F S SUB=$O(^XLM(8993.1,IEN,3,SUB)) Q:'SUB D
..N BOX,IP,PORT,SHORTNM
..S NODE=$G(^XLM(8993.1,IEN,3,SUB,0))
..S BOX=$P(NODE,"^")
..Q:BOX=""
..S PORT=$P(NODE,"^",3)
..I PORT="",BOX'=$$NODE^XULMU Q
..S IP=$P(NODE,"^",2)
..I '$L(IP),BOX'=$$NODE^XULMU Q
..S PARMS("NODES",BOX,"IP ADDRESS")=IP
..S PARMS("NODES",BOX,"PORT")=PORT
..S PARMS("NODES",BOX,"SHORT NAME")=$P(NODE,"^",4)
..S PARMS("NODES",BOX)=SUB
..S COUNT=COUNT+1
..S PARMS("NODES")=COUNT
.I '$D(PARMS("NODES",$$NODE^XULMU)) S PARMS("NODES",$$NODE^XULMU,"IP ADDRESS")="",PARMS("NODES",$$NODE^XULMU,"PORT")="",PARMS("NODES")=$G(PARMS("NODES"))+1
Q $S($L($G(ERROR)):0,1:1)
;
EDIT ;Edit the site parameters
N DA,DIE,DR
S DA=$O(^XLM(8993.1,0))
I 'DA D
.N DATA
.S DATA(.01)=+$$SITE^VASITE
.S DA=$$ADD^XULMU(8993.1,,.DATA)
I 'DA D PAUSE^XULMU("There is no entry in the XULM LOCK MANAGER PARAMETERS file!") Q
S DR="[XULM EDIT PARAMETERS]"
S DIE=8993.1
D ^DIE
Q
;
;
;
;
;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXULMP 1927 printed Oct 16, 2024@18:10:47 Page 2
XULMP ;IRMFO-ALB/CJM/SWO/RGG - KERNEL LOCK MANAGER ;12/01/2012
+1 ;;8.0;KERNEL;**608**;JUL 10, 1995;Build 84
+2 ;;Per VA Directive 6402, this routine should not be modified
+3 ;
+4 ; ******************************************************************
+5 ; * *
+6 ; * The Kernel Lock Manager is based on the VistA Lock Manager *
+7 ; * developed by Tommy Martin. *
+8 ; * *
+9 ; ******************************************************************
+10 ;Setting up parameters
+11 ;
GETPARMS(PARMS,ERROR) ;
+1 ;
+2 KILL PARMS
+3 SET ERROR=""
+4 Begin DoDot:1
+5 NEW IEN,NODE,SUB,COUNT
+6 SET IEN=$ORDER(^XLM(8993.1,0))
+7 IF 'IEN
SET ERROR="Parameter file not setup"
QUIT
+8 SET NODE=$GET(^XLM(8993.1,IEN,0))
+9 SET PARMS("ON?")=$SELECT($PIECE(NODE,"^",2)="e":1,1:0)
+10 SET PARMS("PRODUCTION?")=$$PROD^XUPROD()
+11 SET (COUNT,SUB)=0
+12 FOR
SET SUB=$ORDER(^XLM(8993.1,IEN,3,SUB))
if 'SUB
QUIT
Begin DoDot:2
+13 NEW BOX,IP,PORT,SHORTNM
+14 SET NODE=$GET(^XLM(8993.1,IEN,3,SUB,0))
+15 SET BOX=$PIECE(NODE,"^")
+16 if BOX=""
QUIT
+17 SET PORT=$PIECE(NODE,"^",3)
+18 IF PORT=""
IF BOX'=$$NODE^XULMU
QUIT
+19 SET IP=$PIECE(NODE,"^",2)
+20 IF '$LENGTH(IP)
IF BOX'=$$NODE^XULMU
QUIT
+21 SET PARMS("NODES",BOX,"IP ADDRESS")=IP
+22 SET PARMS("NODES",BOX,"PORT")=PORT
+23 SET PARMS("NODES",BOX,"SHORT NAME")=$PIECE(NODE,"^",4)
+24 SET PARMS("NODES",BOX)=SUB
+25 SET COUNT=COUNT+1
+26 SET PARMS("NODES")=COUNT
End DoDot:2
+27 IF '$DATA(PARMS("NODES",$$NODE^XULMU))
SET PARMS("NODES",$$NODE^XULMU,"IP ADDRESS")=""
SET PARMS("NODES",$$NODE^XULMU,"PORT")=""
SET PARMS("NODES")=$GET(PARMS("NODES"))+1
End DoDot:1
+28 QUIT $SELECT($LENGTH($GET(ERROR)):0,1:1)
+29 ;
EDIT ;Edit the site parameters
+1 NEW DA,DIE,DR
+2 SET DA=$ORDER(^XLM(8993.1,0))
+3 IF 'DA
Begin DoDot:1
+4 NEW DATA
+5 SET DATA(.01)=+$$SITE^VASITE
+6 SET DA=$$ADD^XULMU(8993.1,,.DATA)
End DoDot:1
+7 IF 'DA
DO PAUSE^XULMU("There is no entry in the XULM LOCK MANAGER PARAMETERS file!")
QUIT
+8 SET DR="[XULM EDIT PARAMETERS]"
+9 SET DIE=8993.1
+10 DO ^DIE
+11 QUIT
+12 ;
+13 ;
+14 ;
+15 ;
+16 ;
+17 ;