ZIBVKMSM ; IHS/ADC/GTH - KILL VARIABLES ; [ 02/07/97 3:02 PM ]
;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
;
; This routine kills variables in the namespace of the
; variable passed in the parameter.
; This routine is accessed thru the front end routine XBVK.
;
; Original routine provided by Don Enos, OHPRD, 2 Oct 1995.
;
Q ; No entry from top
;
EN(ZIBVKNS) ;EP - KILL Local variables in the passed namespace.
;
Q:$G(ZIBVKNS)=""
NEW ZIBVKX
S ZIBVKX=$O(@ZIBVKNS,-1)
S:ZIBVKX="" ZIBVKX="%"
K:ZIBVKNS="%" @ZIBVKNS
F S ZIBVKX=$O(@ZIBVKX) Q:ZIBVKX="" Q:$E(ZIBVKX,1,$L(ZIBVKNS))]ZIBVKNS I $E(ZIBVKX,1,$L(ZIBVKNS))=ZIBVKNS,ZIBVKX'["ZIBVK" K @ZIBVKX
Q
;
ZIBVKMSM ; IHS/ADC/GTH - KILL VARIABLES ; [ 02/07/97 3:02 PM ]
+1 ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
+2 ;
+3 ; This routine kills variables in the namespace of the
+4 ; variable passed in the parameter.
+5 ; This routine is accessed thru the front end routine XBVK.
+6 ;
+7 ; Original routine provided by Don Enos, OHPRD, 2 Oct 1995.
+8 ;
+9 ; No entry from top
QUIT
+10 ;
EN(ZIBVKNS) ;EP - KILL Local variables in the passed namespace.
+1 ;
+2 IF $GET(ZIBVKNS)=""
QUIT
+3 NEW ZIBVKX
+4 SET ZIBVKX=$ORDER(@ZIBVKNS,-1)
+5 IF ZIBVKX=""
SET ZIBVKX="%"
+6 IF ZIBVKNS="%"
KILL @ZIBVKNS
+7 FOR
SET ZIBVKX=$ORDER(@ZIBVKX)
IF ZIBVKX=""
QUIT
IF $EXTRACT(ZIBVKX,1,$LENGTH(ZIBVKNS))]ZIBVKNS
QUIT
IF $EXTRACT(ZIBVKX,1,$LENGTH(ZIBVKNS))=ZIBVKNS
IF ZIBVKX'["ZIBVK"
KILL @ZIBVKX
+8 QUIT
+9 ;