- XPDI ;SFISC/RSD - Install Process ;9/16/02 13:29 [ 03/19/2004 12:04 PM ]
- ;;8.0;KERNEL;**10,21,39,41,44,58,68,108,145,184,229,1009**;Jul 10, 1995
- EN ;install
- N DIR,DIRUT,POP,XPD,XPDA,XPDD,XPDIJ,XPDDIQ,XPDIT,XPDIABT,XPDNM,XPDNOQUE,XPDPKG,XPDREQAB,XPDST,XPDSET,XPDSET1,XPDT,XPDQUIT,XPDQUES,Y,ZTSK,%
- S %="I '$P(^(0),U,9),$D(^XPD(9.7,""ASP"",Y,1,Y)),$D(^XTMP(""XPDI"",Y))",XPDST=$$LOOK^XPDI1(%)
- Q:'XPDST!$D(XPDQUIT)
- S XPDIT=0,(XPDSET,XPDSET1)=$P(^XPD(9.7,XPDST,0),U) K ^TMP($J)
- ;Check each part of XPDT array
- F S XPDIT=$O(XPDT(XPDIT)) Q:'XPDIT D Q:'$D(XPDT)!$D(XPDQUIT)
- .S XPDA=+XPDT(XPDIT),XPDNM=$P(XPDT(XPDIT),U,2),XPDPKG=+$P($G(^XPD(9.7,+XPDT(XPDIT),0)),U,2),%=$P(^(0),U,5)
- .W !,"Checking Install for Package ",XPDNM
- .;check that Install file was created correctly
- .I '$D(^XPD(9.7,XPDA,"INI"))!'$D(^("INIT")) W !,"**INSTALL FILE IS CORRUPTED**",!,*7 S XPDQUIT=1 Q
- .;run enviroment check routine
- .;XPDREQAB req. build missing, =2 global killed
- .I $$ENV^XPDIL1(1) S:$G(XPDREQAB)=2 XPDQUIT=1 Q
- .;save variables that are setup in environ. chck. routine
- .I $D(XPDNOQUE)!$D(XPDDIQ) D
- ..S:$D(XPDNOQUE) ^XTMP("XPDI",XPDA,"ENVVAR","XPDNOQUE")=XPDNOQUE
- ..I $D(XPDDIQ) M ^XTMP("XPDI",XPDA,"ENVVAR","XPDDIQ")=XPDDIQ
- .D QUES^XPDI1(XPDA) Q:'$D(XPDT(+XPDIT))!$D(XPDQUIT)
- .;XPDIJ=XPDA if XPDIJ routine is part of Build
- .S:$D(^XTMP("XPDI",XPDA,"RTN","XPDIJ")) XPDIJ=XPDA
- .D XQSET^XPDI1(XPDA)
- ;NONE = no Build to install
- G NONE:'$O(XPDT(""))!$D(XPDQUIT)!($G(XPDREQAB))
- ;check that we have all Builds to install
- S XPDA=XPDST,XPDNM=XPDSET,Y=0
- F S Y=$O(^XPD(9.7,"ASP",XPDA,Y)) Q:'Y S %=+$O(^(Y,0)) I '$D(XPDT("DA",%)) G NONE
- W !
- ;See if a Master Build
- S %=$O(^XTMP("XPDI",XPDA,"BLD",0)),%=$P(^(%,0),U,3) S:%=1 XPDT("MASTER")=XPDA
- ;Inhibit Logon Question
- D DIR^XPDIQ("XPI") I $D(DIRUT) D ABRTALL(2) Q
- ;disable options question
- D DIR^XPDIQ("XPZ") I $D(DIRUT) D ABRTALL(2) Q
- ;XPDSET=set name,(also build name), of options that will be disabled
- ;XPDSET1=setname or null if they don't want to disable
- D I XPDSET1="^" D ABRTALL(2) Q
- .;if they say no, set XPDET1=""
- .S:'$G(XPDQUES("XPZ1")) XPDSET1="",Y=0
- .S ^XTMP("XQOO",XPDSET,0)=XPDSET_" is being installed by KIDS^"_DT_U_DUZ
- .I XPDSET1]"" D Q:XPDSET1="^"!(XPDSET1="")
- ..;merge the options/protocols that were put in ^TMP($J,"XQOO",build name)
- ..M ^XTMP("XQOO",XPDSET)=^TMP($J,"XQOO",XPDSET)
- ..D INIT^XQOO(.XPDSET1) Q:"^"[XPDSET1
- ..N DIR S DIR(0)="N^0:60:0",DIR("B")=0
- ..S DIR("A")="Delay Install (Minutes)",DIR("?")="Enter the number of minutes to delay the installing of Routines after the Disable of Options"
- ..W ! D ^DIR I $D(DIRUT) S XPDSET1="^"
- .;Y is set in the call to DIR in previous .DO
- .;save setname into first Build and the Delay in minutes, Y
- .K XPD S XPD(9.7,XPDST_",",7)=(XPDSET1]"")_XPDSET,XPD(9.7,XPDST_",",8)=Y
- .D FILE^DIE("","XPD")
- ;check if they want to update other CPUs
- I $G(XPDQUES("XPZ2")) D I $D(DIRUT) D ABRTALL(2) Q
- .N DA,DIE,DIR,DR,I,XPD,X,Y,Z
- .;if they haven't already added Volume Sets, populate the mulitple
- .I '$O(^XPD(9.7,XPDA,"VOL",0)) D I $D(XPD) D UPDATE^DIE("","XPD")
- ..X ^%ZOSF("UCI") S Y=$P(Y,",",2),(I,Z)=0
- ..F S I=$O(^%ZIS(14.5,I)) Q:'I S X=$G(^(I,0)) S:$P(X,U)]""&$P(X,U,11)&($P(X,U)'=Y) Z=Z+1,XPD(9.703,"+"_Z_","_XPDA_",",.01)=$P(X,U)
- .W !!,"I will Update the following VOLUME SETS:",!
- .S I=0 F S I=$O(^XPD(9.7,XPDA,"VOL",I)) Q:'I W ?3,$P(^(I,0),U),!
- .W ! S DIR(0)="Y",DIR("A")="Want to edit this list",DIR("B")="NO"
- .D ^DIR Q:$D(DIRUT) D:Y
- ..S DA=XPDA,DIE="^XPD(9.7,",DR=30,DR(2,9.703)=".01"
- ..D ^DIE
- .I '$O(^XPD(9.7,XPDA,"VOL",0)) W !!,"No VOLUME SETS selected!!" Q
- .Q:$$TM^%ZTLOAD ;quit if Taskman is running
- .W !!,"TASKMAN is not running. If you install now, you must run the routine XPDCPU",!,"in the production UCI for each of the VOLUME SETS you have listed once"
- .W !,"the installation starts!!",!,"If you Queue the install, the VOLUME SETS will be updated automatically.",*7,*7,!!
- DEV S POP=0 S:'$D(^DD(3.5,0)) POP=1
- ;check if home device is defined
- I 'POP S IOP="",%ZIS=0 D ^%ZIS
- ;Kernel Virgin Install
- I POP S XPDA=XPDST D:$G(XPDIJ) XPDIJ^XPDI1 G EN^XPDIJ
- ;set XPDA=starting Build, ask for device for messages
- ;XPDNOQUE is defined means don't let them queue output
- W !!,"Enter the Device you want to print the Install messages."
- W:'$D(XPDNOQUE) !,"You can queue the install by enter a 'Q' at the device prompt."
- W !,"Enter a '^' to abort the install.",!
- S XPDA=XPDST,%ZIS=$P("Q",U,'$D(XPDNOQUE))
- D ^%ZIS G:POP ASKABRT
- ;reset expiration date to T+7 on transport global
- S XPDD=$$FMADD^XLFDT(DT,7),^XTMP("XPDI",0)=XPDD_U_DT
- I $D(IO("Q")) D G ASKABRT:$D(ZTSK)[0 D XPDIJ^XPDI1:$G(XPDIJ),QUIT^XPDI1(XPDST) Q
- . N DIR,NOW S NOW=$$HTFM^XLFDT($$HADD^XLFDT($H,,,2)) ;Must be in future
- . S DIR(0)="DA^"_NOW_":"_XPDD_":AEFRSX"
- . S DIR("A")="Request Start Time: "
- . S DIR("B")=$$FMTE^XLFDT(NOW)
- . S DIR("?",1)="Enter a Date including Time"
- . S DIR("?",2)="The time must be in the future and not to exceed 7 days in the future."
- . S DIR("?")="Current date/time: "_DIR("B")
- . D ^DIR
- .Q:$D(DIRUT)
- .S ZTDTH=Y,ZTRTN="EN^XPDIJ",ZTDESC=XPDNM_" KIDS install",ZTSAVE("XPDA")=""
- .D ^%ZTLOAD,HOME^%ZIS K IO("Q")
- .Q:$D(ZTSK)[0
- .W !,"Install Queued!",!!
- .;save task into first Build
- .K XPD S XPD(9.7,XPDST_",",5)=ZTSK,XPDIT=0
- .F S XPDIT=$O(XPDT(XPDIT)) Q:'XPDIT S XPD(9.7,+XPDT(XPDIT)_",",.02)=1 D FILE^DIE("","XPD") K XPD
- ;run install
- U IO D XPDIJ^XPDI1:$G(XPDIJ),QUIT^XPDI1(XPDST) G EN^XPDIJ
- Q
- ;
- ;XPDA=ien to del, XPDK=1 kill global, XPDALL=1 deleting all
- ;XPDST=starting package.
- ABORT(XPDA,XPDK,XPDALL) ;abort install of Build XPDA
- N %,DA,DIK,XPDJ,XPDNM,Y
- Q:'$D(^XPD(9.7,XPDA,0)) S XPDNM=$P(^(0),U)
- D BMES^XPDUTL(XPDNM_" Build will not be installed"_$S(XPDK=1:", Transport Global deleted!",1:"")),MES^XPDUTL(" "_$$HTE^XLFDT($H))
- S DIK="^XPD(9.7,",XPDJ=XPDT("NM",XPDNM),DA=XPDA
- ;kill XPDT array, but don't kill global if XPDK=2
- K XPDT("NM",XPDNM),XPDT("DA",XPDA),XPDT(XPDJ),XPDT("GP") Q:XPDK=2
- K ^XTMP("XPDI",XPDA)
- ;if we are not deleting all packages and we are deleting the starting package
- ;set the next package to the starting package. It must always be 1.
- I '$G(XPDALL),XPDA=XPDST S Y=$O(XPDT(0)) D:Y
- .;unlock starting install
- .L -^XPD(9.7,XPDST)
- .S XPDST=+XPDT(Y),XPDT(1)=XPDT(Y),XPDT("DA",XPDST)=1,XPDT("NM",$P(XPDT(Y),U,2))=1,XPDIT=0
- .K XPDT(Y) N XPD
- .S %="XPD(9.7,"""_XPDST_","")",@%@(3)=XPDST,@%@(4)=1
- .;loop thru the rest of the packages and reset the starting package field
- .F S Y=$O(XPDT(Y)) Q:'Y D
- ..S XPD(9.7,+XPDT(Y)_",",3)=XPDST
- .D FILE^DIE("","XPD")
- D ^DIK
- Q
- ASKABRT ;ask if want to unload distribution
- N DIR,DIRUT,X,Y
- S XPDQUIT=1,DIR(0)="Y",DIR("A")="Install ABORTED, Want to remove the Transport Globals",DIR("B")="YES"
- W ! D ^DIR I Y D ABRTALL(1) Q
- L -^XPD(9.7,XPDST)
- Q
- ABRTALL(XPDK) ;abort all Builds
- N XPDA
- S XPDT=0
- F S XPDT=$O(XPDT(XPDT)) Q:'XPDT S XPDA=+XPDT(XPDT) D ABORT(XPDA,XPDK,1)
- ;unlock starting install
- L -^XPD(9.7,XPDST)
- Q
- NONE W !!,"**NOTHING INSTALLED**",!
- Q
- XPDI ;SFISC/RSD - Install Process ;9/16/02 13:29 [ 03/19/2004 12:04 PM ]
- +1 ;;8.0;KERNEL;**10,21,39,41,44,58,68,108,145,184,229,1009**;Jul 10, 1995
- EN ;install
- +1 NEW DIR,DIRUT,POP,XPD,XPDA,XPDD,XPDIJ,XPDDIQ,XPDIT,XPDIABT,XPDNM,XPDNOQUE,XPDPKG,XPDREQAB,XPDST,XPDSET,XPDSET1,XPDT,XPDQUIT,XPDQUES,Y,ZTSK,%
- +2 SET %="I '$P(^(0),U,9),$D(^XPD(9.7,""ASP"",Y,1,Y)),$D(^XTMP(""XPDI"",Y))"
- SET XPDST=$$LOOK^XPDI1(%)
- +3 IF 'XPDST!$DATA(XPDQUIT)
- QUIT
- +4 SET XPDIT=0
- SET (XPDSET,XPDSET1)=$PIECE(^XPD(9.7,XPDST,0),U)
- KILL ^TMP($JOB)
- +5 ;Check each part of XPDT array
- +6 FOR
- SET XPDIT=$ORDER(XPDT(XPDIT))
- IF 'XPDIT
- QUIT
- Begin DoDot:1
- +7 SET XPDA=+XPDT(XPDIT)
- SET XPDNM=$PIECE(XPDT(XPDIT),U,2)
- SET XPDPKG=+$PIECE($GET(^XPD(9.7,+XPDT(XPDIT),0)),U,2)
- SET %=$PIECE(^(0),U,5)
- +8 WRITE !,"Checking Install for Package ",XPDNM
- +9 ;check that Install file was created correctly
- +10 IF '$DATA(^XPD(9.7,XPDA,"INI"))!'$DATA(^("INIT"))
- WRITE !,"**INSTALL FILE IS CORRUPTED**",!,*7
- SET XPDQUIT=1
- QUIT
- +11 ;run enviroment check routine
- +12 ;XPDREQAB req. build missing, =2 global killed
- +13 IF $$ENV^XPDIL1(1)
- IF $GET(XPDREQAB)=2
- SET XPDQUIT=1
- QUIT
- +14 ;save variables that are setup in environ. chck. routine
- +15 IF $DATA(XPDNOQUE)!$DATA(XPDDIQ)
- Begin DoDot:2
- +16 IF $DATA(XPDNOQUE)
- SET ^XTMP("XPDI",XPDA,"ENVVAR","XPDNOQUE")=XPDNOQUE
- +17 IF $DATA(XPDDIQ)
- MERGE ^XTMP("XPDI",XPDA,"ENVVAR","XPDDIQ")=XPDDIQ
- End DoDot:2
- +18 DO QUES^XPDI1(XPDA)
- IF '$DATA(XPDT(+XPDIT))!$DATA(XPDQUIT)
- QUIT
- +19 ;XPDIJ=XPDA if XPDIJ routine is part of Build
- +20 IF $DATA(^XTMP("XPDI",XPDA,"RTN","XPDIJ"))
- SET XPDIJ=XPDA
- +21 DO XQSET^XPDI1(XPDA)
- End DoDot:1
- IF '$DATA(XPDT)!$DATA(XPDQUIT)
- QUIT
- +22 ;NONE = no Build to install
- +23 IF '$ORDER(XPDT(""))!$DATA(XPDQUIT)!($GET(XPDREQAB))
- GOTO NONE
- +24 ;check that we have all Builds to install
- +25 SET XPDA=XPDST
- SET XPDNM=XPDSET
- SET Y=0
- +26 FOR
- SET Y=$ORDER(^XPD(9.7,"ASP",XPDA,Y))
- IF 'Y
- QUIT
- SET %=+$ORDER(^(Y,0))
- IF '$DATA(XPDT("DA",%))
- GOTO NONE
- +27 WRITE !
- +28 ;See if a Master Build
- +29 SET %=$ORDER(^XTMP("XPDI",XPDA,"BLD",0))
- SET %=$PIECE(^(%,0),U,3)
- IF %=1
- SET XPDT("MASTER")=XPDA
- +30 ;Inhibit Logon Question
- +31 DO DIR^XPDIQ("XPI")
- IF $DATA(DIRUT)
- DO ABRTALL(2)
- QUIT
- +32 ;disable options question
- +33 DO DIR^XPDIQ("XPZ")
- IF $DATA(DIRUT)
- DO ABRTALL(2)
- QUIT
- +34 ;XPDSET=set name,(also build name), of options that will be disabled
- +35 ;XPDSET1=setname or null if they don't want to disable
- +36 Begin DoDot:1
- +37 ;if they say no, set XPDET1=""
- +38 IF '$GET(XPDQUES("XPZ1"))
- SET XPDSET1=""
- SET Y=0
- +39 SET ^XTMP("XQOO",XPDSET,0)=XPDSET_" is being installed by KIDS^"_DT_U_DUZ
- +40 IF XPDSET1]""
- Begin DoDot:2
- +41 ;merge the options/protocols that were put in ^TMP($J,"XQOO",build name)
- +42 MERGE ^XTMP("XQOO",XPDSET)=^TMP($JOB,"XQOO",XPDSET)
- +43 DO INIT^XQOO(.XPDSET1)
- IF "^"[XPDSET1
- QUIT
- +44 NEW DIR
- SET DIR(0)="N^0:60:0"
- SET DIR("B")=0
- +45 SET DIR("A")="Delay Install (Minutes)"
- SET DIR("?")="Enter the number of minutes to delay the installing of Routines after the Disable of Options"
- +46 WRITE !
- DO ^DIR
- IF $DATA(DIRUT)
- SET XPDSET1="^"
- End DoDot:2
- IF XPDSET1="^"!(XPDSET1="")
- QUIT
- +47 ;Y is set in the call to DIR in previous .DO
- +48 ;save setname into first Build and the Delay in minutes, Y
- +49 KILL XPD
- SET XPD(9.7,XPDST_",",7)=(XPDSET1]"")_XPDSET
- SET XPD(9.7,XPDST_",",8)=Y
- +50 DO FILE^DIE("","XPD")
- End DoDot:1
- IF XPDSET1="^"
- DO ABRTALL(2)
- QUIT
- +51 ;check if they want to update other CPUs
- +52 IF $GET(XPDQUES("XPZ2"))
- Begin DoDot:1
- +53 NEW DA,DIE,DIR,DR,I,XPD,X,Y,Z
- +54 ;if they haven't already added Volume Sets, populate the mulitple
- +55 IF '$ORDER(^XPD(9.7,XPDA,"VOL",0))
- Begin DoDot:2
- +56 XECUTE ^%ZOSF("UCI")
- SET Y=$PIECE(Y,",",2)
- SET (I,Z)=0
- +57 FOR
- SET I=$ORDER(^%ZIS(14.5,I))
- IF 'I
- QUIT
- SET X=$GET(^(I,0))
- IF $PIECE(X,U)]""&$PIECE(X,U,11)&($PIECE(X,U)'=Y)
- SET Z=Z+1
- SET XPD(9.703,"+"_Z_","_XPDA_",",.01)=$PIECE(X,U)
- End DoDot:2
- IF $DATA(XPD)
- DO UPDATE^DIE("","XPD")
- +58 WRITE !!,"I will Update the following VOLUME SETS:",!
- +59 SET I=0
- FOR
- SET I=$ORDER(^XPD(9.7,XPDA,"VOL",I))
- IF 'I
- QUIT
- WRITE ?3,$PIECE(^(I,0),U),!
- +60 WRITE !
- SET DIR(0)="Y"
- SET DIR("A")="Want to edit this list"
- SET DIR("B")="NO"
- +61 DO ^DIR
- IF $DATA(DIRUT)
- QUIT
- IF Y
- Begin DoDot:2
- +62 SET DA=XPDA
- SET DIE="^XPD(9.7,"
- SET DR=30
- SET DR(2,9.703)=".01"
- +63 DO ^DIE
- End DoDot:2
- +64 IF '$ORDER(^XPD(9.7,XPDA,"VOL",0))
- WRITE !!,"No VOLUME SETS selected!!"
- QUIT
- +65 ;quit if Taskman is running
- IF $$TM^%ZTLOAD
- QUIT
- +66 WRITE !!,"TASKMAN is not running. If you install now, you must run the routine XPDCPU",!,"in the production UCI for each of the VOLUME SETS you have listed once"
- +67 WRITE !,"the installation starts!!",!,"If you Queue the install, the VOLUME SETS will be updated automatically.",*7,*7,!!
- End DoDot:1
- IF $DATA(DIRUT)
- DO ABRTALL(2)
- QUIT
- DEV SET POP=0
- IF '$DATA(^DD(3.5,0))
- SET POP=1
- +1 ;check if home device is defined
- +2 IF 'POP
- SET IOP=""
- SET %ZIS=0
- DO ^%ZIS
- +3 ;Kernel Virgin Install
- +4 IF POP
- SET XPDA=XPDST
- IF $GET(XPDIJ)
- DO XPDIJ^XPDI1
- GOTO EN^XPDIJ
- +5 ;set XPDA=starting Build, ask for device for messages
- +6 ;XPDNOQUE is defined means don't let them queue output
- +7 WRITE !!,"Enter the Device you want to print the Install messages."
- +8 IF '$DATA(XPDNOQUE)
- WRITE !,"You can queue the install by enter a 'Q' at the device prompt."
- +9 WRITE !,"Enter a '^' to abort the install.",!
- +10 SET XPDA=XPDST
- SET %ZIS=$PIECE("Q",U,'$DATA(XPDNOQUE))
- +11 DO ^%ZIS
- IF POP
- GOTO ASKABRT
- +12 ;reset expiration date to T+7 on transport global
- +13 SET XPDD=$$FMADD^XLFDT(DT,7)
- SET ^XTMP("XPDI",0)=XPDD_U_DT
- +14 IF $DATA(IO("Q"))
- Begin DoDot:1
- +15 ;Must be in future
- NEW DIR,NOW
- SET NOW=$$HTFM^XLFDT($$HADD^XLFDT($HOROLOG,,,2))
- +16 SET DIR(0)="DA^"_NOW_":"_XPDD_":AEFRSX"
- +17 SET DIR("A")="Request Start Time: "
- +18 SET DIR("B")=$$FMTE^XLFDT(NOW)
- +19 SET DIR("?",1)="Enter a Date including Time"
- +20 SET DIR("?",2)="The time must be in the future and not to exceed 7 days in the future."
- +21 SET DIR("?")="Current date/time: "_DIR("B")
- +22 DO ^DIR
- +23 IF $DATA(DIRUT)
- QUIT
- +24 SET ZTDTH=Y
- SET ZTRTN="EN^XPDIJ"
- SET ZTDESC=XPDNM_" KIDS install"
- SET ZTSAVE("XPDA")=""
- +25 DO ^%ZTLOAD
- DO HOME^%ZIS
- KILL IO("Q")
- +26 IF $DATA(ZTSK)[0
- QUIT
- +27 WRITE !,"Install Queued!",!!
- +28 ;save task into first Build
- +29 KILL XPD
- SET XPD(9.7,XPDST_",",5)=ZTSK
- SET XPDIT=0
- +30 FOR
- SET XPDIT=$ORDER(XPDT(XPDIT))
- IF 'XPDIT
- QUIT
- SET XPD(9.7,+XPDT(XPDIT)_",",.02)=1
- DO FILE^DIE("","XPD")
- KILL XPD
- End DoDot:1
- IF $DATA(ZTSK)[0
- GOTO ASKABRT
- IF $GET(XPDIJ)
- DO XPDIJ^XPDI1
- DO QUIT^XPDI1(XPDST)
- QUIT
- +31 ;run install
- +32 USE IO
- IF $GET(XPDIJ)
- DO XPDIJ^XPDI1
- DO QUIT^XPDI1(XPDST)
- GOTO EN^XPDIJ
- +33 QUIT
- +34 ;
- +35 ;XPDA=ien to del, XPDK=1 kill global, XPDALL=1 deleting all
- +36 ;XPDST=starting package.
- ABORT(XPDA,XPDK,XPDALL) ;abort install of Build XPDA
- +1 NEW %,DA,DIK,XPDJ,XPDNM,Y
- +2 IF '$DATA(^XPD(9.7,XPDA,0))
- QUIT
- SET XPDNM=$PIECE(^(0),U)
- +3 DO BMES^XPDUTL(XPDNM_" Build will not be installed"_$SELECT(XPDK=1:", Transport Global deleted!",1:""))
- DO MES^XPDUTL(" "_$$HTE^XLFDT($HOROLOG))
- +4 SET DIK="^XPD(9.7,"
- SET XPDJ=XPDT("NM",XPDNM)
- SET DA=XPDA
- +5 ;kill XPDT array, but don't kill global if XPDK=2
- +6 KILL XPDT("NM",XPDNM),XPDT("DA",XPDA),XPDT(XPDJ),XPDT("GP")
- IF XPDK=2
- QUIT
- +7 KILL ^XTMP("XPDI",XPDA)
- +8 ;if we are not deleting all packages and we are deleting the starting package
- +9 ;set the next package to the starting package. It must always be 1.
- +10 IF '$GET(XPDALL)
- IF XPDA=XPDST
- SET Y=$ORDER(XPDT(0))
- IF Y
- Begin DoDot:1
- +11 ;unlock starting install
- +12 LOCK -^XPD(9.7,XPDST)
- +13 SET XPDST=+XPDT(Y)
- SET XPDT(1)=XPDT(Y)
- SET XPDT("DA",XPDST)=1
- SET XPDT("NM",$PIECE(XPDT(Y),U,2))=1
- SET XPDIT=0
- +14 KILL XPDT(Y)
- NEW XPD
- +15 SET %="XPD(9.7,"""_XPDST_","")"
- SET @%@(3)=XPDST
- SET @%@(4)=1
- +16 ;loop thru the rest of the packages and reset the starting package field
- +17 FOR
- SET Y=$ORDER(XPDT(Y))
- IF 'Y
- QUIT
- Begin DoDot:2
- +18 SET XPD(9.7,+XPDT(Y)_",",3)=XPDST
- End DoDot:2
- +19 DO FILE^DIE("","XPD")
- End DoDot:1
- +20 DO ^DIK
- +21 QUIT
- ASKABRT ;ask if want to unload distribution
- +1 NEW DIR,DIRUT,X,Y
- +2 SET XPDQUIT=1
- SET DIR(0)="Y"
- SET DIR("A")="Install ABORTED, Want to remove the Transport Globals"
- SET DIR("B")="YES"
- +3 WRITE !
- DO ^DIR
- IF Y
- DO ABRTALL(1)
- QUIT
- +4 LOCK -^XPD(9.7,XPDST)
- +5 QUIT
- ABRTALL(XPDK) ;abort all Builds
- +1 NEW XPDA
- +2 SET XPDT=0
- +3 FOR
- SET XPDT=$ORDER(XPDT(XPDT))
- IF 'XPDT
- QUIT
- SET XPDA=+XPDT(XPDT)
- DO ABORT(XPDA,XPDK,1)
- +4 ;unlock starting install
- +5 LOCK -^XPD(9.7,XPDST)
- +6 QUIT
- NONE WRITE !!,"**NOTHING INSTALLED**",!
- +1 QUIT