- ZIBVKCA ; IHS/ADC/GTH - KILL VARIABLES ; [ 10/29/2002 7:42 AM ]
- ;;3.0;IHS/VA UTILITIES;**9**;FEB 07, 1997
- ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002
- ;
- ; 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 Dr. Mark Delaney, TASSC, 12 Dec 2001.
- ;
- Q ; No entry from top
- ;
- EN(ZIBVKNS) ;EP - KILL Local variables in the passed namespace.
- ;
- Q:$G(ZIBVKNS)=""
- NEW ZIBVKX
- S ZIBVKX=ZIBVKNS K @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
- ;
- ZIBVKCA ; IHS/ADC/GTH - KILL VARIABLES ; [ 10/29/2002 7:42 AM ]
- +1 ;;3.0;IHS/VA UTILITIES;**9**;FEB 07, 1997
- +2 ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002
- +3 ;
- +4 ; This routine kills variables in the namespace of the
- +5 ; variable passed in the parameter.
- +6 ; This routine is accessed thru the front end routine XBVK.
- +7 ;
- +8 ; Original routine provided by Dr. Mark Delaney, TASSC, 12 Dec 2001.
- +9 ;
- +10 ; No entry from top
- QUIT
- +11 ;
- EN(ZIBVKNS) ;EP - KILL Local variables in the passed namespace.
- +1 ;
- +2 IF $GET(ZIBVKNS)=""
- QUIT
- +3 NEW ZIBVKX
- +4 SET ZIBVKX=ZIBVKNS
- KILL @ZIBVKNS
- +5 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
- +6 QUIT
- +7 ;