Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XBDELR

XBDELR.m

Go to the documentation of this file.
  1. XBDELR ; IHS/ASDST/GTH - AN XB UTILITY ; [ 10/29/2002 7:42 AM ]
  1. ;;3.0;IHS/VA UTILITIES;**9**;FEB 07, 1997
  1. ;
  1. ; IHS/SET/GTH XB*3*9 10/29/2002
  1. ;
  1. ; Delete routines in namespace "XBN", if XBA=0.
  1. ; If XBA=1, single routine.
  1. ;
  1. ; It's up to the calling routine to make sure it's not deleted, if
  1. ; the calling routine is the current routine.
  1. ;
  1. ; E.g.: D DEL^XBDELR("MYROUTIN",1) Del 1 routine named "MYROUTIN".
  1. ; D DEL^XBDELR("NS") Del all routines in "NS" namespace.
  1. ;
  1. ;
  1. DEL(XBN,XBA) ;PEP - Delete routine(s).
  1. I $G(XBA)=1 S ^TMP("XBDELR",$J,XBN)=""
  1. E Q:'$$RSEL^ZIBRSEL(XBN_"*","^TMP(""XBDELR"","_$J_",")
  1. ;
  1. NEW X
  1. ;
  1. S X=""
  1. 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>")
  1. KILL ^TMP("XBDELR",$J)
  1. Q
  1. ;