source: lang-file4mu1and2/DMLAINI1.m@ 1787

Last change on this file since 1787 was 1598, checked in by Sam Habiel, 12 years ago

Updated Language files INIT to be in DMLA rather than DILA per Mr. Timson's request.

File size: 2.5 KB
Line 
1DMLAINI1 ; ; 20-NOV-2012
2 ;;22.2;LANGUAGE FILE INITS;;NOV 20, 2012
3 ; LOADS AND INDEXES DD'S
4 ;
5 K DIF,DIK,D,DDF,DDT,DTO,D0,DLAYGO,DIC,DIDUZ,DIR,DA,DFR,DTN,DIX,DZ D DT^DICRW S %=1,U="^",DSEC=1
6 S NO=$P("I 0^I $D(@X)#2,X[U",U,%) I %<1 K DIFQ Q
7ASK I %=1,$D(DIFQ(0)) W !,"SHALL I WRITE OVER FILE SECURITY CODES" S %=2 D YN^DICN S DSEC=%=1 I %<1 K DIFQ Q
8 Q:'$D(DIFQ) S %=2 W !!,"ARE YOU SURE EVERYTHING'S OK" D YN^DICN I %-1 K DIFQ Q
9 I $D(DIFKEP) F DIDIU=0:0 S DIDIU=$O(DIFKEP(DIDIU)) Q:DIDIU'>0 S DIU=DIDIU,DIU(0)=DIFKEP(DIDIU) D EN^DIU2
10 D DT^DICRW K ^UTILITY(U,$J),^UTILITY("DIK",$J) D WAIT^DICD
11 S DN="^DMLAI" F R=1:1:7 D @(DN_$$B36(R)) W "."
12 F S D=$O(^UTILITY(U,$J,"SBF","")) Q:D'>0 K:'DIFQ(D) ^(D) S D=$O(^(D,"")) I D>0 K ^(D) D IX
13KEYSNIX ; Keys and new style indexes installer ; new in FM V22.2
14 N DIFRSA S DIFRSA=$NA(^UTILITY("KX",$J)) ; Tran global for Keys and Indexes
15 N DIFRFILE S DIFRFILE=0 ; Loop through files
16 F S DIFRFILE=$O(@DIFRSA@("IX",DIFRFILE)) Q:'DIFRFILE D
17 . K ^TMP("DIFROMS2",$J,"TRIG")
18 . N DIFRD S DIFRD=0
19 . F S DIFRD=$O(@DIFRSA@("IX",DIFRFILE,DIFRD)) Q:'DIFRD D DDIXIN^DIFROMSX(DIFRFILE,DIFRD,DIFRSA) ; install New Style Indexes
20 . K ^TMP("DIFROMS2",$J,"TRIG")
21 . S DIFRD=0
22 . F S DIFRD=$O(@DIFRSA@("KEY",DIFRFILE,DIFRD)) Q:'DIFRD D DDKEYIN^DIFROMSY(DIFRFILE,DIFRD,DIFRSA) ; install keys
23 K @DIFRSA ; kill off tran global
24 ; VEN/SMH v22.2: Below I added a K D1 because it leaks from the call causing the key matching algo to fail.
25DATA W "." S (D,DDF(1),DDT(0))=$O(^UTILITY(U,$J,0)) Q:D'>0
26 I DIFQR(D) S DTO=0,DMRG=1,DTO(0)=^(D),Z=^(D)_"0)",D0=^(D,0),@Z=D0,DFR(1)="^UTILITY(U,$J,DDF(1),D0,",DKP=DIFQR(D)'=2 F D0=0:0 S D0=$O(^UTILITY(U,$J,DDF(1),D0)) S:D0="" D0=-1 K D1 Q:'$D(^(D0,0)) S Z=^(0) D I^DITR
27 K ^UTILITY(U,$J,DDF(1)),DDF,DDT,DTO,DFR,DFN,DTN G DATA
28 ;
29W S Y=$P($T(@X),";",2) W !,"NOTE: This package also contains "_Y_"S",! Q:'$D(DIFQ(0))
30 S %=1 W ?6,"SHALL I WRITE OVER EXISTING "_Y_"S OF THE SAME NAME" D YN^DICN I '% W !?6,"Answer YES to replace the current "_Y_"S with the incoming ones." G W
31 S:%=2 DIFQ(X)=0 K:%<0 DIFQ
32 Q
33 ;
34OPT ;OPTION
35RTN ;ROUTINE DOCUMENTATION NOTE
36FUN ;FUNCTION
37BUL ;BULLETIN
38KEY ;SECURITY KEY
39HEL ;HELP FRAME
40DIP ;PRINT TEMPLATE
41DIE ;INPUT TEMPLATE
42DIB ;SORT TEMPLATE
43DIS ;FORM
44REM ;REMOTE PROCEDURE
45 ;
46SBF ;FILE AND SUB FILE NUMBERS
47IX W "." S DIK="A" F %=0:0 S DIK=$O(^DD(D,DIK)) Q:DIK="" K ^(DIK)
48 S DA(1)=D,DIK="^DD("_D_"," D IXALL^DIK
49 I $D(^DIC(D,"%",0)) S DIK="^DIC(D,""%""," G IXALL^DIK
50 Q
51B36(X) Q $$N(X\(36*36)#36+1)_$$N(X\36#36+1)_$$N(X#36+1)
52N(%) Q $E("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",%)
Note: See TracBrowser for help on using the repository browser.