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

XBPKG.m

Go to the documentation of this file.
  1. XBPKG ;IHS/SET/GTH - MOVE FILES INTO PACKAGE ENTRY ; [ 04/18/2003 9:06 AM ]
  1. ;;3.0;IHS/VA UTILITIES;**9**;FEB 07, 1997
  1. ;IHS/SET/GTH XB*3*9 10/29/2002 New Routine.
  1. ; Move selected files into the selected entry in the PACKAGE
  1. ; file. The entry in the PACKAGE file can then be DIFROM'd, and
  1. ; the resulting routines searched for routine or global references
  1. ; or lines of code of interest.
  1. ;
  1. ; The IENs in the PACKAGE multiple will be equal to the FILE number.
  1. ; Data will not be included with files.
  1. ;
  1. ; User will be asked if all entries in the selected entry in PACKAGE
  1. ; should be KILL'd before the move. If the FILE multiple is not
  1. ; KILL'd, the selected files will be added (possibly overwrite) to
  1. ; the existing entries in the FILE multiple.
  1. ;
  1. ;
  1. START ;
  1. W !,"Select the files that you want to copy into the entry in PACKAGE",!
  1. D ^XBDSET
  1. Q:'$D(^UTILITY("XBDSET",$J))
  1. NEW DA
  1. S DA=$$SELPKG
  1. Q:+DA<1
  1. S X=$$ASKKILL($P(^DIC(9.4,DA,0),"^",1))
  1. Q:X="^"
  1. I X KILL ^DIC(9.4,DA,4)
  1. D MOVEFILS(DA)
  1. D EOJ
  1. Q
  1. ;
  1. ;
  1. SELPKG() ;-- Select the entry in PACKAGE into which to move the files.
  1. W !!,"Select the entry in PACKAGE into which to move the files"
  1. NEW DIC
  1. S DIC=9.4,DIC(0)="AEL"
  1. D ^DIC
  1. Q +Y
  1. ;
  1. ASKKILL(P) ;-- Ask the user if KILL multiple in PACKAGE prior to move.
  1. Q $$DIR^XBDIR("Y","KILL the FILE multiple in PACKAGE for "_P,"N")
  1. ;
  1. MOVEFILS(DA) ;-- Move the selected files into the selected entry in PACKAGE.
  1. Q:'(DA=+DA)
  1. Q:'$D(^DIC(9.4,DA))
  1. NEW C,I
  1. S (C,I)=0
  1. F S I=$O(^UTILITY("XBDSET",$J,I)) Q:'(I=+I) D
  1. . S ^DIC(9.4,DA,4,I,0)=I
  1. . S ^DIC(9.4,DA,4,I,222)="y^y^^n^^^n^m^y"
  1. . S ^DIC(9.4,DA,4,"B",I,I)=""
  1. . S C=C+1
  1. .Q
  1. S ^DIC(9.4,DA,4,0)="^9.44PA^"_$O(^UTILITY("XBDSET",$J,99999999),-1)_"^"_C
  1. W !!,C_" files set into Package "_$P(^DIC(9.4,DA,0),U)_".",!
  1. Q
  1. ;
  1. EOJ ;
  1. KILL XBDSC,XBDSFF,XBDSFILE,XBDSHI,XBDSL,XBDSLO,XBDSND,XBDSP,XBDSQ,XBDSTF,XBDSX
  1. KILL DIC,DIR,DIRUT,DTOUT,DUOUT,X,Y
  1. Q
  1. ;