XUINTSK4 ;SEA/RDS-TaskMan: Conversion, ^%ZIS, Part 3 ;6/24/91 10:23 ;
;;7.0;Kernel;;Jul 17, 1992
;
EVERY ;Code executed every time conversion is done
W !,"Now I will update 14.5, 14.6, and 14.7 based on this volume set and cpu.",!?5
E D VOLUME,UCI,LINK,CVPAIR
S ZT1=0 F ZT=0:0 S ZT1=$O(^%ZIS(14.5,ZT1)) Q:'ZT1 S ZTS=^(ZT1,0),ZTM=$P(ZTS,U,6) D MGR I ZTM="" K DD,DO S DIE="^%ZIS(14.5,",DA=ZT1,DR=".01:7" D ^DIE W !?5,"." S ZT1=0
W !?5,"All done."
K %,%Y,C,D,D0,DA,DD,DI,DIC,DICR,DIE,DIG,DIH,DISYS,DIU,DIV,DIW,DQ,DR,DTOUT,DUOUT,X,Y,ZT,ZT1,ZT2,ZT3,ZT4,ZT7,ZTDEF,ZTDINUM,ZTENV,ZTF01,ZTF1,ZTF2,ZTF3,ZTF4,ZTF5,ZTF6,ZTF7,ZTI,ZTM,ZTM1,ZTM2,ZTMAST,ZTN,ZTPAIR,ZTS,ZTU,ZTUCI,ZTV,ZTVI,ZTVOL,ZTXMB
Q
;
VOLUME ;EVERY--make sure the current volume set has been filed
S ZTV=$P(ZTENV,U,2)
S ZTVI=$O(^%ZIS(14.5,"B",ZTV,""))
I ZTVI]"" Q
K DD,DO S DIC="^%ZIS(14.5,",DIC(0)="L",X=ZTV D FILE^DICN
K DD S DIE=DIC,DA=$P(Y,U),ZTVI=DA,DR=".01:7" D ^DIE
W "."
Q
;
UCI ;EVERY--make sure all ucis on this volume set are filed
I ^%ZOSF("OS")'["DSM" Q
S X="NOUCI^XUINTSK4",@^%ZOSF("TRAP")
F ZT1=1:1 S ZTU=$P($ZU(ZT1),",") Q:ZTU="" I $O(^%ZIS(14.6,"AV",ZTV,ZTU,""))="" D ADDUCI
NOUCI Q
;
ADDUCI ;UCI--add a uci on this volume set to file 14.6
K DO S DIC="^%ZIS(14.6,",DIC(0)="L",X=ZTU
S DINUM=$P(^%ZIS(14.6,0),U,3)+1
F ZT=0:0 Q:'$D(^%ZIS(14.6,DINUM)) S DINUM=DINUM+1
S $P(^%ZIS(14.6,0),U,3)=DINUM,ZTDINUM=DINUM
K DD D FILE^DICN
K DD S DIE=DIC,DA=ZTDINUM,DR="1////"_ZTVI D ^DIE
K DINUM W "."
Q
;
LINK ;EVERY--make sure LINK node entries are filed and cleaned out
S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH("LINK",ZT1)) Q:ZT1="" D CHECK I $O(^%ZTSCH("LINK",ZT1,""))="" K ^%ZTSCH("LINK",ZT1)
Q
;
CHECK ;LINK--ensure a link entry is filed
S ZTI=$O(^%ZIS(14.5,"B",ZT1,""))
I ZTI]"" Q
K DD,DO S DIC="^%ZIS(14.5,",DIC(0)="L",X=ZT1 D FILE^DICN
K DD S DIE=DIC,DA=$P(Y,U),DR=".01:7" D ^DIE
W "."
Q
;
CVPAIR ;EVERY--file record for current cpu-volume pair
S ZTPAIR=$P(ZTENV,U,4)
S ZTI=$O(^%ZIS(14.7,"B",ZTPAIR,""))
I ZTI]"" Q
S ZTDEF=$S($D(@(ZTXMB_"(1,1,3)"))#2:^(3),1:"")
S ZTS=$S($D(@(ZTXMB_"(1,1,4,ZTVI,0)"))#2:^(0),1:"")
S ZTF01=ZTPAIR
S ZTF1=$P(ZTS,U,6),ZTF1=$S(ZTF1="":"N",ZTF1="n":"N",ZTF1="y":"Y",1:"N")
S ZTF2="N"
S ZTF3=$P(ZTDEF,U,3),ZTF3=$S(ZTF3="":"",ZTF3<1:"",ZTF3>10:"",1:ZTF3\1)
S ZTF4=$P(ZTDEF,U,4),ZTF4=$S(^%ZOSF("OS")["VAX DSM":"",^%ZOSF("OS")'["DSM":"",ZTF4="":"",ZTF4<1:"",ZTF4>3:"",1:ZTF4\1+1*8)
S ZTF5=$P(ZTDEF,U,5),ZTF5=ZTF5\1
S ZTF6=$P(ZTS,U,7),ZTF6=$S(ZTF6:"////"_ZTF6,1:"")
S ZTF7=$P(ZTDEF,U,6),ZTF7=+ZTF7
K DD,DO S DIC="^%ZIS(14.7,",DIC(0)="L",X=ZTPAIR D FILE^DICN
S DIE=DIC,DA=$P(Y,U)
S DR="1////"_ZTF1_";2////"_ZTF2_";3////"_ZTF3_";4////"_ZTF4_";5////"_ZTF5_";6"_ZTF6_";7////"_ZTF7
I ZTF6="" W !!,"For cpu-volume pair ",ZTPAIR,!,"-------------------------------"
K DD D ^DIE I ZTF6="" W !
W "."
Q
;
MGR ;EVERY--ensure MGR ucis are filed
I ZTM="" Q
S ZTN=$P(ZTS,U)
S ZTI=$O(^%ZIS(14.6,"AV",ZTN,ZTM,""))
I ZTI]"" Q
S DINUM=$P(^%ZIS(14.6,0),U,3)+1
F ZT=0:0 Q:'$D(^%ZIS(14.6,DINUM)) S DINUM=DINUM+1
S $P(^%ZIS(14.6,0),U,3)=DINUM
K DD,DO S DIC="^%ZIS(14.6,",DIC(0)="L",X=ZTM D FILE^DICN
K DD S DIE=DIC,DA=$P(Y,U),DR="1////"_ZT1 D ^DIE W "."
K DINUM Q
;
XUINTSK4 ;SEA/RDS-TaskMan: Conversion, ^%ZIS, Part 3 ;6/24/91 10:23 ;
+1 ;;7.0;Kernel;;Jul 17, 1992
+2 ;
EVERY ;Code executed every time conversion is done
+1 WRITE !,"Now I will update 14.5, 14.6, and 14.7 based on this volume set and cpu.",!?5
E DO VOLUME
DO UCI
DO LINK
DO CVPAIR
+1 SET ZT1=0
FOR ZT=0:0
SET ZT1=$ORDER(^%ZIS(14.5,ZT1))
IF 'ZT1
QUIT
SET ZTS=^(ZT1,0)
SET ZTM=$PIECE(ZTS,U,6)
DO MGR
IF ZTM=""
KILL DD,DO
SET DIE="^%ZIS(14.5,"
SET DA=ZT1
SET DR=".01:7"
DO ^DIE
WRITE !?5,"."
SET ZT1=0
+2 WRITE !?5,"All done."
+3 KILL %,%Y,C,D,D0,DA,DD,DI,DIC,DICR,DIE,DIG,DIH,DISYS,DIU,DIV,DIW,DQ,DR,DTOUT,DUOUT,X,Y,ZT,ZT1,ZT2,ZT3,ZT4,ZT7,ZTDEF,ZTDINUM,ZTENV,ZTF01,ZTF1,ZTF2,ZTF3,ZTF4,ZTF5,ZTF6,ZTF7,ZTI,ZTM,ZTM1,ZTM2,ZTMAST,ZTN,ZTPAIR,ZTS,ZTU,ZTUCI,ZTV,ZTVI,ZTVOL,ZTXMB
+4 QUIT
+5 ;
VOLUME ;EVERY--make sure the current volume set has been filed
+1 SET ZTV=$PIECE(ZTENV,U,2)
+2 SET ZTVI=$ORDER(^%ZIS(14.5,"B",ZTV,""))
+3 IF ZTVI]""
QUIT
+4 KILL DD,DO
SET DIC="^%ZIS(14.5,"
SET DIC(0)="L"
SET X=ZTV
DO FILE^DICN
+5 KILL DD
SET DIE=DIC
SET DA=$PIECE(Y,U)
SET ZTVI=DA
SET DR=".01:7"
DO ^DIE
+6 WRITE "."
+7 QUIT
+8 ;
UCI ;EVERY--make sure all ucis on this volume set are filed
+1 IF ^%ZOSF("OS")'["DSM"
QUIT
+2 SET X="NOUCI^XUINTSK4"
SET @^%ZOSF("TRAP")
+3 FOR ZT1=1:1
SET ZTU=$PIECE($ZU(ZT1),",")
IF ZTU=""
QUIT
IF $ORDER(^%ZIS(14.6,"AV",ZTV,ZTU,""))=""
DO ADDUCI
NOUCI QUIT
+1 ;
ADDUCI ;UCI--add a uci on this volume set to file 14.6
+1 KILL DO
SET DIC="^%ZIS(14.6,"
SET DIC(0)="L"
SET X=ZTU
+2 SET DINUM=$PIECE(^%ZIS(14.6,0),U,3)+1
+3 FOR ZT=0:0
IF '$DATA(^%ZIS(14.6,DINUM))
QUIT
SET DINUM=DINUM+1
+4 SET $PIECE(^%ZIS(14.6,0),U,3)=DINUM
SET ZTDINUM=DINUM
+5 KILL DD
DO FILE^DICN
+6 KILL DD
SET DIE=DIC
SET DA=ZTDINUM
SET DR="1////"_ZTVI
DO ^DIE
+7 KILL DINUM
WRITE "."
+8 QUIT
+9 ;
LINK ;EVERY--make sure LINK node entries are filed and cleaned out
+1 SET ZT1=""
FOR ZT=0:0
SET ZT1=$ORDER(^%ZTSCH("LINK",ZT1))
IF ZT1=""
QUIT
DO CHECK
IF $ORDER(^%ZTSCH("LINK",ZT1,""))=""
KILL ^%ZTSCH("LINK",ZT1)
+2 QUIT
+3 ;
CHECK ;LINK--ensure a link entry is filed
+1 SET ZTI=$ORDER(^%ZIS(14.5,"B",ZT1,""))
+2 IF ZTI]""
QUIT
+3 KILL DD,DO
SET DIC="^%ZIS(14.5,"
SET DIC(0)="L"
SET X=ZT1
DO FILE^DICN
+4 KILL DD
SET DIE=DIC
SET DA=$PIECE(Y,U)
SET DR=".01:7"
DO ^DIE
+5 WRITE "."
+6 QUIT
+7 ;
CVPAIR ;EVERY--file record for current cpu-volume pair
+1 SET ZTPAIR=$PIECE(ZTENV,U,4)
+2 SET ZTI=$ORDER(^%ZIS(14.7,"B",ZTPAIR,""))
+3 IF ZTI]""
QUIT
+4 SET ZTDEF=$SELECT($DATA(@(ZTXMB_"(1,1,3)"))#2:^(3),1:"")
+5 SET ZTS=$SELECT($DATA(@(ZTXMB_"(1,1,4,ZTVI,0)"))#2:^(0),1:"")
+6 SET ZTF01=ZTPAIR
+7 SET ZTF1=$PIECE(ZTS,U,6)
SET ZTF1=$SELECT(ZTF1="":"N",ZTF1="n":"N",ZTF1="y":"Y",1:"N")
+8 SET ZTF2="N"
+9 SET ZTF3=$PIECE(ZTDEF,U,3)
SET ZTF3=$SELECT(ZTF3="":"",ZTF3<1:"",ZTF3>10:"",1:ZTF3\1)
+10 SET ZTF4=$PIECE(ZTDEF,U,4)
SET ZTF4=$SELECT(^%ZOSF("OS")["VAX DSM":"",^%ZOSF("OS")'["DSM":"",ZTF4="":"",ZTF4<1:"",ZTF4>3:"",1:ZTF4\1+1*8)
+11 SET ZTF5=$PIECE(ZTDEF,U,5)
SET ZTF5=ZTF5\1
+12 SET ZTF6=$PIECE(ZTS,U,7)
SET ZTF6=$SELECT(ZTF6:"////"_ZTF6,1:"")
+13 SET ZTF7=$PIECE(ZTDEF,U,6)
SET ZTF7=+ZTF7
+14 KILL DD,DO
SET DIC="^%ZIS(14.7,"
SET DIC(0)="L"
SET X=ZTPAIR
DO FILE^DICN
+15 SET DIE=DIC
SET DA=$PIECE(Y,U)
+16 SET DR="1////"_ZTF1_";2////"_ZTF2_";3////"_ZTF3_";4////"_ZTF4_";5////"_ZTF5_";6"_ZTF6_";7////"_ZTF7
+17 IF ZTF6=""
WRITE !!,"For cpu-volume pair ",ZTPAIR,!,"-------------------------------"
+18 KILL DD
DO ^DIE
IF ZTF6=""
WRITE !
+19 WRITE "."
+20 QUIT
+21 ;
MGR ;EVERY--ensure MGR ucis are filed
+1 IF ZTM=""
QUIT
+2 SET ZTN=$PIECE(ZTS,U)
+3 SET ZTI=$ORDER(^%ZIS(14.6,"AV",ZTN,ZTM,""))
+4 IF ZTI]""
QUIT
+5 SET DINUM=$PIECE(^%ZIS(14.6,0),U,3)+1
+6 FOR ZT=0:0
IF '$DATA(^%ZIS(14.6,DINUM))
QUIT
SET DINUM=DINUM+1
+7 SET $PIECE(^%ZIS(14.6,0),U,3)=DINUM
+8 KILL DD,DO
SET DIC="^%ZIS(14.6,"
SET DIC(0)="L"
SET X=ZTM
DO FILE^DICN
+9 KILL DD
SET DIE=DIC
SET DA=$PIECE(Y,U)
SET DR="1////"_ZT1
DO ^DIE
WRITE "."
+10 KILL DINUM
QUIT
+11 ;