DINIT6 ;SFISC/XAK-INITIALIZE VA FILEMAN ;2:13 PM 2 Nov 1998
;;22.0;VA FileMan;;Mar 30, 1999
;Per VHA Directive 10-93-142, this routine should not be modified.
I $D(^DD("OS"))[0 D OS^DINIT
W !!,"The following files have been installed:",!
F X=0:0 S X=$O(^DIC(X)) Q:X>1.9999 Q:'X W $E(" ",1,(3-$L($P(X,"."))))_X,?11,$P($G(^DIC(X,0)),U),! S ^DD(X,0,"VR")=VERSION
S ^DD("VERSION")=VERSION,X=^DD("OS",^DD("OS"),0)
S ^DD("ROU")=$P(X,U,4) K ^DD("SUB")
D 1
D ^DINITPST
E W !,"INITIALIZATION COMPLETED IN "_($P($H,",",2)-DIT)_" SECONDS."
D KL Q
;
1 N DIT
D KL,PKG,DIINIT
Q
;
KL K %,%H,%X,%Y,DD,DH,DIC,DIK,DIT,DITZS,D,DA,VERSION,DU,F,I,J,P,X,Y,DIRUT,DTOUT,DUOUT
Q
PKG ;
I $D(^DIC(9.4,0))#2,($P(^DIC(9.4,0),U,1)'="PACKAGE") D Q
. W !!,"You have a file #9.4 that is not the 'Package' file."
. W !,"Therefore, the Package file will not be initialized on your system."
. W !,"You cannot use VA FileMan's package export utility, DIFROM."
. Q
I $$ROUEXIST^DILIBF("XPDUTL"),$$VERSION^XPDUTL("XU")'<8 Q
K ^DD(9.4,913.5,2),^DD(9.4,914.5,2),^DD(9.4,916.5,2),^DD(9.44,222.7,2),^DD(9.44,222.9,2),^DD(9.44,1909)
W !!,"Your Package file will now be updated.",!!
D EN^DIPKINIT
;
;Update DIPK Package file entry
N DIDATE,DIERR,DINDESC,DINIEN,DINFDA,DINMSG,DIVERS,X,Y,%DT
S DIVERS=$P($T(V^DINIT),";",3)
S X=$P($T(V^DINIT),";",6),%DT="" D ^%DT S DIDATE=Y
S DINFDA(9.4,"?+1,",.01)="DIPK (PACKAGE FILE INIT)"
S DINFDA(9.4,"?+1,",1)="DIPK"
S DINFDA(9.4,"?+1,",2)="FileMan Init of Package File"
S DINDESC(1,0)="Init of Package file to be used by VA FileMan sites that wish to export"
S DINDESC(2,0)="software using DIFROM."
S DINFDA(9.4,"?+1,",3)="DINDESC"
S DINFDA(9.4,"?+1,",13)=DIVERS
S DINFDA(9.49,"?+2,?+1,",.01)=DIVERS
S:DIDATE>0 DINFDA(9.49,"?+2,?+1,",1)=DIDATE
S DINFDA(9.49,"?+2,?+1,",2)=DT
S:$G(DUZ) DINFDA(9.49,"?+2,?+1,",3)=DUZ
D UPDATE^DIE("","DINFDA","DINIEN","DINMSG")
Q
DIINIT ;Update VA FileMan package entry
N DIDATE,DIERR,DINIEN,DINFDA,DINMSG,DIVERS,X,Y,%DT
S DIVERS=$P($T(V^DINIT),";",3)
S X=$P($T(V^DINIT),";",6),%DT="" D ^%DT S DIDATE=Y
S DINFDA(9.4,"?+1,",.01)="VA FILEMAN"
S DINFDA(9.4,"?+1,",1)="DI"
S DINFDA(9.4,"?+1,",2)="FM INIT"
S DINFDA(9.4,"?+1,",13)=DIVERS
S DINFDA(9.49,"?+2,?+1,",.01)=DIVERS
S:DIDATE>0 DINFDA(9.49,"?+2,?+1,",1)=DIDATE
S DINFDA(9.49,"?+2,?+1,",2)=DT
S:$G(DUZ) DINFDA(9.49,"?+2,?+1,",3)=DUZ
D UPDATE^DIE("","DINFDA","DINIEN","DINMSG")
I $G(DIERR),$D(DINMSG("DIERR","E",299)) D
. W !!,$C(7),"WARNING: There is more than one 'VA FILEMAN' entry in the Package file (#9.4)."
. W !," I am unable to determine which is the correct entry to update with"
. W !," current installation data."
. W !!," You can delete or edit erroneous entries and run DINIT again."
. N DIR,DTOUT,DUOUT,DIRUT,DIROUT
. S DIR(0)="E"
. W ! D ^DIR
;
;Put PACKAGE pointer into FM DIALOG entries, re-index file
N DIPKG,DIREC S DIPKG=$G(DINIEN(1))
W !!,"Re-indexing entries in the DIALOG file."
F DIREC=0:0 S DIREC=$O(^DI(.84,DIREC)) Q:'DIREC!(DIREC>10000) D
. S $P(^DI(.84,DIREC,0),U,4)=DIPKG
K DA S DIK="^DI(.84," D IXALL^DIK
Q
;
;Install FileMan options, keys, remote procedures, and DI package
;I $P($G(^DIC(19,0)),U,1)="OPTION",$P($G(^DIC(19.1,0)),U,1)="SECURITY KEY" D
;. W !!,"Options, security keys, and remote procedures will now be added to your system.",!!
;. D EN^DIINIT
;. I $$FIND1^DIC(19,"","","DDMP IMPORT") D
;. . N DIOK
;. . S DIOK=$$ADD^XPDMENU("DIOTHER","DDMP IMPORT","",8)
;. . I 'DIOK W !,"The DDMP IMPORT option was not added to the DIOTHER menu.",!
;. Q
Q
DINIT6 ;SFISC/XAK-INITIALIZE VA FILEMAN ;2:13 PM 2 Nov 1998
+1 ;;22.0;VA FileMan;;Mar 30, 1999
+2 ;Per VHA Directive 10-93-142, this routine should not be modified.
+3 IF $DATA(^DD("OS"))[0
DO OS^DINIT
+4 WRITE !!,"The following files have been installed:",!
+5 FOR X=0:0
SET X=$ORDER(^DIC(X))
IF X>1.9999
QUIT
IF 'X
QUIT
WRITE $EXTRACT(" ",1,(3-$LENGTH($PIECE(X,"."))))_X,?11,$PIECE($GET(^DIC(X,0)),U),!
SET ^DD(X,0,"VR")=VERSION
+6 SET ^DD("VERSION")=VERSION
SET X=^DD("OS",^DD("OS"),0)
+7 SET ^DD("ROU")=$PIECE(X,U,4)
KILL ^DD("SUB")
+8 DO 1
+9 DO ^DINITPST
E WRITE !,"INITIALIZATION COMPLETED IN "_($PIECE($HOROLOG,",",2)-DIT)_" SECONDS."
+1 DO KL
QUIT
+2 ;
1 NEW DIT
+1 DO KL
DO PKG
DO DIINIT
+2 QUIT
+3 ;
KL KILL %,%H,%X,%Y,DD,DH,DIC,DIK,DIT,DITZS,D,DA,VERSION,DU,F,I,J,P,X,Y,DIRUT,DTOUT,DUOUT
+1 QUIT
PKG ;
+1 IF $DATA(^DIC(9.4,0))#2
IF ($PIECE(^DIC(9.4,0),U,1)'="PACKAGE")
Begin DoDot:1
+2 WRITE !!,"You have a file #9.4 that is not the 'Package' file."
+3 WRITE !,"Therefore, the Package file will not be initialized on your system."
+4 WRITE !,"You cannot use VA FileMan's package export utility, DIFROM."
+5 QUIT
End DoDot:1
QUIT
+6 IF $$ROUEXIST^DILIBF("XPDUTL")
IF $$VERSION^XPDUTL("XU")'<8
QUIT
+7 KILL ^DD(9.4,913.5,2),^DD(9.4,914.5,2),^DD(9.4,916.5,2),^DD(9.44,222.7,2),^DD(9.44,222.9,2),^DD(9.44,1909)
+8 WRITE !!,"Your Package file will now be updated.",!!
+9 DO EN^DIPKINIT
+10 ;
+11 ;Update DIPK Package file entry
+12 NEW DIDATE,DIERR,DINDESC,DINIEN,DINFDA,DINMSG,DIVERS,X,Y,%DT
+13 SET DIVERS=$PIECE($TEXT(V^DINIT),";",3)
+14 SET X=$PIECE($TEXT(V^DINIT),";",6)
SET %DT=""
DO ^%DT
SET DIDATE=Y
+15 SET DINFDA(9.4,"?+1,",.01)="DIPK (PACKAGE FILE INIT)"
+16 SET DINFDA(9.4,"?+1,",1)="DIPK"
+17 SET DINFDA(9.4,"?+1,",2)="FileMan Init of Package File"
+18 SET DINDESC(1,0)="Init of Package file to be used by VA FileMan sites that wish to export"
+19 SET DINDESC(2,0)="software using DIFROM."
+20 SET DINFDA(9.4,"?+1,",3)="DINDESC"
+21 SET DINFDA(9.4,"?+1,",13)=DIVERS
+22 SET DINFDA(9.49,"?+2,?+1,",.01)=DIVERS
+23 IF DIDATE>0
SET DINFDA(9.49,"?+2,?+1,",1)=DIDATE
+24 SET DINFDA(9.49,"?+2,?+1,",2)=DT
+25 IF $GET(DUZ)
SET DINFDA(9.49,"?+2,?+1,",3)=DUZ
+26 DO UPDATE^DIE("","DINFDA","DINIEN","DINMSG")
+27 QUIT
DIINIT ;Update VA FileMan package entry
+1 NEW DIDATE,DIERR,DINIEN,DINFDA,DINMSG,DIVERS,X,Y,%DT
+2 SET DIVERS=$PIECE($TEXT(V^DINIT),";",3)
+3 SET X=$PIECE($TEXT(V^DINIT),";",6)
SET %DT=""
DO ^%DT
SET DIDATE=Y
+4 SET DINFDA(9.4,"?+1,",.01)="VA FILEMAN"
+5 SET DINFDA(9.4,"?+1,",1)="DI"
+6 SET DINFDA(9.4,"?+1,",2)="FM INIT"
+7 SET DINFDA(9.4,"?+1,",13)=DIVERS
+8 SET DINFDA(9.49,"?+2,?+1,",.01)=DIVERS
+9 IF DIDATE>0
SET DINFDA(9.49,"?+2,?+1,",1)=DIDATE
+10 SET DINFDA(9.49,"?+2,?+1,",2)=DT
+11 IF $GET(DUZ)
SET DINFDA(9.49,"?+2,?+1,",3)=DUZ
+12 DO UPDATE^DIE("","DINFDA","DINIEN","DINMSG")
+13 IF $GET(DIERR)
IF $DATA(DINMSG("DIERR","E",299))
Begin DoDot:1
+14 WRITE !!,$CHAR(7),"WARNING: There is more than one 'VA FILEMAN' entry in the Package file (#9.4)."
+15 WRITE !," I am unable to determine which is the correct entry to update with"
+16 WRITE !," current installation data."
+17 WRITE !!," You can delete or edit erroneous entries and run DINIT again."
+18 NEW DIR,DTOUT,DUOUT,DIRUT,DIROUT
+19 SET DIR(0)="E"
+20 WRITE !
DO ^DIR
End DoDot:1
+21 ;
+22 ;Put PACKAGE pointer into FM DIALOG entries, re-index file
+23 NEW DIPKG,DIREC
SET DIPKG=$GET(DINIEN(1))
+24 WRITE !!,"Re-indexing entries in the DIALOG file."
+25 FOR DIREC=0:0
SET DIREC=$ORDER(^DI(.84,DIREC))
IF 'DIREC!(DIREC>10000)
QUIT
Begin DoDot:1
+26 SET $PIECE(^DI(.84,DIREC,0),U,4)=DIPKG
End DoDot:1
+27 KILL DA
SET DIK="^DI(.84,"
DO IXALL^DIK
+28 QUIT
+29 ;
+30 ;Install FileMan options, keys, remote procedures, and DI package
+31 ;I $P($G(^DIC(19,0)),U,1)="OPTION",$P($G(^DIC(19.1,0)),U,1)="SECURITY KEY" D
+32 ;. W !!,"Options, security keys, and remote procedures will now be added to your system.",!!
+33 ;. D EN^DIINIT
+34 ;. I $$FIND1^DIC(19,"","","DDMP IMPORT") D
+35 ;. . N DIOK
+36 ;. . S DIOK=$$ADD^XPDMENU("DIOTHER","DDMP IMPORT","",8)
+37 ;. . I 'DIOK W !,"The DDMP IMPORT option was not added to the DIOTHER menu.",!
+38 ;. Q
+39 QUIT