source: IHS-VA_UTILITIES-XB/trunk/XBPKG.m@ 1751

Last change on this file since 1751 was 642, checked in by Sam Habiel, 15 years ago

Modified directory structure; moved routines.

File size: 1.9 KB
Line 
1XBPKG ;IHS/SET/GTH - MOVE FILES INTO PACKAGE ENTRY ; [ 04/18/2003 9:06 AM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;IHS/SET/GTH XB*3*9 10/29/2002 New Routine.
4 ; Move selected files into the selected entry in the PACKAGE
5 ; file. The entry in the PACKAGE file can then be DIFROM'd, and
6 ; the resulting routines searched for routine or global references
7 ; or lines of code of interest.
8 ;
9 ; The IENs in the PACKAGE multiple will be equal to the FILE number.
10 ; Data will not be included with files.
11 ;
12 ; User will be asked if all entries in the selected entry in PACKAGE
13 ; should be KILL'd before the move. If the FILE multiple is not
14 ; KILL'd, the selected files will be added (possibly overwrite) to
15 ; the existing entries in the FILE multiple.
16 ;
17 ;
18START ;
19 W !,"Select the files that you want to copy into the entry in PACKAGE",!
20 D ^XBDSET
21 Q:'$D(^UTILITY("XBDSET",$J))
22 NEW DA
23 S DA=$$SELPKG
24 Q:+DA<1
25 S X=$$ASKKILL($P(^DIC(9.4,DA,0),"^",1))
26 Q:X="^"
27 I X KILL ^DIC(9.4,DA,4)
28 D MOVEFILS(DA)
29 D EOJ
30 Q
31 ;
32 ;
33SELPKG() ;-- Select the entry in PACKAGE into which to move the files.
34 W !!,"Select the entry in PACKAGE into which to move the files"
35 NEW DIC
36 S DIC=9.4,DIC(0)="AEL"
37 D ^DIC
38 Q +Y
39 ;
40ASKKILL(P) ;-- Ask the user if KILL multiple in PACKAGE prior to move.
41 Q $$DIR^XBDIR("Y","KILL the FILE multiple in PACKAGE for "_P,"N")
42 ;
43MOVEFILS(DA) ;-- Move the selected files into the selected entry in PACKAGE.
44 Q:'(DA=+DA)
45 Q:'$D(^DIC(9.4,DA))
46 NEW C,I
47 S (C,I)=0
48 F S I=$O(^UTILITY("XBDSET",$J,I)) Q:'(I=+I) D
49 . S ^DIC(9.4,DA,4,I,0)=I
50 . S ^DIC(9.4,DA,4,I,222)="y^y^^n^^^n^m^y"
51 . S ^DIC(9.4,DA,4,"B",I,I)=""
52 . S C=C+1
53 .Q
54 S ^DIC(9.4,DA,4,0)="^9.44PA^"_$O(^UTILITY("XBDSET",$J,99999999),-1)_"^"_C
55 W !!,C_" files set into Package "_$P(^DIC(9.4,DA,0),U)_".",!
56 Q
57 ;
58EOJ ;
59 KILL XBDSC,XBDSFF,XBDSFILE,XBDSHI,XBDSL,XBDSLO,XBDSND,XBDSP,XBDSQ,XBDSTF,XBDSX
60 KILL DIC,DIR,DIRUT,DTOUT,DUOUT,X,Y
61 Q
62 ;
Note: See TracBrowser for help on using the repository browser.