- XBDELR ; IHS/ASDST/GTH - AN XB UTILITY ; [ 10/29/2002 7:42 AM ]
- ;;3.0;IHS/VA UTILITIES;**9**;FEB 07, 1997
- ;
- ; IHS/SET/GTH XB*3*9 10/29/2002
- ;
- ; Delete routines in namespace "XBN", if XBA=0.
- ; If XBA=1, single routine.
- ;
- ; It's up to the calling routine to make sure it's not deleted, if
- ; the calling routine is the current routine.
- ;
- ; E.g.: D DEL^XBDELR("MYROUTIN",1) Del 1 routine named "MYROUTIN".
- ; D DEL^XBDELR("NS") Del all routines in "NS" namespace.
- ;
- ;
- DEL(XBN,XBA) ;PEP - Delete routine(s).
- I $G(XBA)=1 S ^TMP("XBDELR",$J,XBN)=""
- E Q:'$$RSEL^ZIBRSEL(XBN_"*","^TMP(""XBDELR"","_$J_",")
- ;
- NEW X
- ;
- S X=""
- F S X=$O(^TMP("XBDELR",$J,X)) Q:X="" X ^%ZOSF("DEL") I '$D(ZTQUEUED) D BMES^XPDUTL(X_$E("...........",1,11-$L(X))_"<poof'd>")
- KILL ^TMP("XBDELR",$J)
- Q
- ;
- XBDELR ; IHS/ASDST/GTH - AN XB UTILITY ; [ 10/29/2002 7:42 AM ]
- +1 ;;3.0;IHS/VA UTILITIES;**9**;FEB 07, 1997
- +2 ;
- +3 ; IHS/SET/GTH XB*3*9 10/29/2002
- +4 ;
- +5 ; Delete routines in namespace "XBN", if XBA=0.
- +6 ; If XBA=1, single routine.
- +7 ;
- +8 ; It's up to the calling routine to make sure it's not deleted, if
- +9 ; the calling routine is the current routine.
- +10 ;
- +11 ; E.g.: D DEL^XBDELR("MYROUTIN",1) Del 1 routine named "MYROUTIN".
- +12 ; D DEL^XBDELR("NS") Del all routines in "NS" namespace.
- +13 ;
- +14 ;
- DEL(XBN,XBA) ;PEP - Delete routine(s).
- +1 IF $GET(XBA)=1
- SET ^TMP("XBDELR",$JOB,XBN)=""
- +2 IF '$TEST
- IF '$$RSEL^ZIBRSEL(XBN_"*","^TMP(""XBDELR"","_$JOB_",")
- QUIT
- +3 ;
- +4 NEW X
- +5 ;
- +6 SET X=""
- +7 FOR
- SET X=$ORDER(^TMP("XBDELR",$JOB,X))
- IF X=""
- QUIT
- XECUTE ^%ZOSF("DEL")
- IF '$DATA(ZTQUEUED)
- DO BMES^XPDUTL(X_$EXTRACT("...........",1,11-$LENGTH(X))_"<poof'd>")
- +8 KILL ^TMP("XBDELR",$JOB)
- +9 QUIT
- +10 ;