XULMLOG ;IRMFO-ALB/CJM/SWO/RGG - KERNEL LOCK MANAGER ;08/21/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. *
; * *
; ******************************************************************
;
;
PURGE ;
;
N DIR,LAST,TIME,IEN,DIRUT,Y
S DIR(0)="N^0:365:0"
S DIR("B")=30
S DIR("A")="How many days of data should be retained"
D ^DIR
Q:$D(DIRUT)
S LAST=$$FMADD^XLFDT(($$NOW^XLFDT\1),-Y)
S TIME=0
F S TIME=$O(^XLM(8993.2,"B",TIME)) Q:'TIME Q:TIME>LAST D
.S IEN=0
.F S IEN=$O(^XLM(8993.2,"B",TIME,IEN)) Q:'IEN D DELETE^XULMU(8993.2,IEN)
W !,"DONE!" D PAUSE^XULMU
;
Q
;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXULMLOG 1027 printed Oct 16, 2024@18:10:45 Page 2
XULMLOG ;IRMFO-ALB/CJM/SWO/RGG - KERNEL LOCK MANAGER ;08/21/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 ;
+11 ;
PURGE ;
+1 ;
+2 NEW DIR,LAST,TIME,IEN,DIRUT,Y
+3 SET DIR(0)="N^0:365:0"
+4 SET DIR("B")=30
+5 SET DIR("A")="How many days of data should be retained"
+6 DO ^DIR
+7 if $DATA(DIRUT)
QUIT
+8 SET LAST=$$FMADD^XLFDT(($$NOW^XLFDT\1),-Y)
+9 SET TIME=0
+10 FOR
SET TIME=$ORDER(^XLM(8993.2,"B",TIME))
if 'TIME
QUIT
if TIME>LAST
QUIT
Begin DoDot:1
+11 SET IEN=0
+12 FOR
SET IEN=$ORDER(^XLM(8993.2,"B",TIME,IEN))
if 'IEN
QUIT
DO DELETE^XULMU(8993.2,IEN)
End DoDot:1
+13 WRITE !,"DONE!"
DO PAUSE^XULMU
+14 ;
+15 QUIT
+16 ;
+17 ;