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

XBKERCLN.m

Go to the documentation of this file.
  1. XBKERCLN ; IHS/ADC/GTH - CLEAN OUT KERNEL NAMESPACE ITEMS PRIOR TO INSTALL ; [ 02/07/97 3:02 PM ]
  1. ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
  1. ;
  1. ; This routine is a modified XBPKDEL for use specifically
  1. ; to clean out KERNEL package items prior to new KERNEL
  1. ; install. This routine does not delete any security keys.
  1. ;
  1. D ^XBKVAR,ASK
  1. G:AUPKSTP EOJ
  1. F AUPKNSP="XU","XQ","XM","ZT","ZE","ZI","ZR","ZS" D PKDEL
  1. S %=1
  1. D ENASK^XQ3 ;CALL TO FIX OPTION POINTERS
  1. G EOJ
  1. ;
  1. PKDEL ;
  1. I '$D(^DIC(0)) W !,*7,"Filemanager does not exist in this UCI!" G EOJ
  1. I '$D(AUPKNSP) W !,*7,"Namespace variable does not exist!" G EOJ
  1. S U="^",DUZ(0)="@",AUPKQUIT=AUPKNSP_"{"
  1. F AUPKGLO="^DIBT(","^DIPT(","^DIE(","^DIC(19,","^XMB(3.6,","^DIC(9.2,","^DD(""FUNC""," D DELETE
  1. Q
  1. ;
  1. ASK ;ASK USER IF WANTS TO CONTINUE
  1. S AUPKSTP=0
  1. W !!,*7,"This routine will delete all options, sort,input,print templates,",!,"bulletins, functions, ",$S($D(AUPKEY):"help frames and security keys",1:"and help frames")," namespaced `XU,XQ,XM,ZT,ZE,ZI,ZR,ZS' "
  1. W !,"that are currently in this UCI. "
  1. W "Do you want to continue"
  1. S %=1
  1. D YN^DICN
  1. I %=0 W !!,"If you answer with a ""NO"" or a ""^"" I will stop this package deletion.",! G ASK
  1. I %=2!(%=-1) S AUPKSTP=1
  1. W !
  1. Q
  1. ;
  1. DELETE ;
  1. W !!,"Now deleting `",AUPKNSP,"' namespaced ",$P(@(AUPKGLO_"0)"),U),"S..."
  1. S AUPKNSPC=AUPKNSP
  1. I $D(@(AUPKGLO_"""B"",AUPKNSPC)")) S DA=$O(@(AUPKGLO_"""B"",AUPKNSPC,"""")")),DIK=AUPKGLO D ^DIK KILL DIK,DA
  1. F L=0:0 S AUPKNSPC=$O(@(AUPKGLO_"""B"",AUPKNSPC)")) Q:AUPKNSPC=""!(AUPKNSPC]AUPKQUIT) S DA=$O(@(AUPKGLO_"""B"",AUPKNSPC,"""")")) W !?3,AUPKNSPC S DIK=AUPKGLO D ^DIK KILL DIK,DA
  1. Q
  1. ;
  1. LIST ; ENTRY POINT FOR LISTING NAMESPACED ITEMS
  1. I '$D(^DIC(0)) W !,*7,"Filemanager does not exist in this UCI!" Q
  1. S U="^",DUZ(0)="@"
  1. W !!,"Utility to list all Kernel namespaced items in current UCI",!
  1. D ^%ZIS
  1. G:POP EOJ
  1. U IO
  1. F AUPKNSP="XU","XQ","XM","ZT","ZE","ZI","ZR","ZS" D LIST1
  1. D ^%ZISC
  1. G EOJ
  1. ;
  1. LIST1 ;
  1. W !!,"Listing of items in namespace ",AUPKNSP,!
  1. W "--------------------------------------",!
  1. S AUPKQUIT=AUPKNSP_"{"
  1. S %=0
  1. F AUPKGLO="^DIBT(","^DIPT(","^DIE(","^DIC(19,","^DIC(19.1,","^XMB(3.6,","^DIC(9.2,","^DD(""FUNC""," D LIST2
  1. Q
  1. ;
  1. LIST2 ;
  1. S AUPKNSPC=$O(@(AUPKGLO_"""B"",AUPKNSP)"))
  1. I $P(AUPKNSPC,AUPKNSP)]"" W:% ! S %=0 W "NO ",$P(@(AUPKGLO_"0)"),"^",1),"S",! Q
  1. S %=1
  1. W !,$P(@(AUPKGLO_"0)"),"^",1),"S",!
  1. S AUPKNSPC=AUPKNSP
  1. F L=0:0 S AUPKNSPC=$O(@(AUPKGLO_"""B"",AUPKNSPC)")) Q:AUPKNSPC=""!(AUPKNSPC]AUPKQUIT) S DA=$O(@(AUPKGLO_"""B"",AUPKNSPC,"""")")) W ?3,AUPKNSPC,!
  1. Q
  1. ;
  1. EOJ ;
  1. KILL AUPKGLO,AUPKEY,AUPKSTP,AUPKNSP,AUPKNSPC,AUPKQUIT,AUPKRUN,AUPKDOC
  1. Q
  1. ;