ZTMCHK1 ;SEA/RDS-Taskman: Option, ZTMCHECK, Part 2 ;5/31/07 12:13
;;8.0;KERNEL;**127,446**;Jul 10, 1995;Build 35
;
LINKS ;Check Required Volume Sets' Links
W !!,"Checking the links to the required volume sets..."
S (ZTJ,ZTV)=0
F S ZTV=$O(^%ZIS(14.5,ZTV)) Q:'ZTV S ZTS=$P(^(ZTV,0),U) I $P(^(0),U,5)="Y",ZTS'=ZTVOL D LK
I 'ZTJ W !?5,"There are no volume sets whose links are required!"
W !!,"Checks completed...Taskman's environment is okay!"
;
EOP ;Pause at end of page
W ! S Y="" F ZT=0:0 R !,"Press RETURN to continue or '^' to exit: ",Y:$S($D(DTIME)#2:DTIME,1:60) S:'$T DTOUT="" S:Y="^" DUOUT="" Q:Y=""!(Y="^") W !!,"Enter either RETURN or '^'",! W:Y'["?" $C(7)
I $D(DUOUT)!$D(DTOUT) W:$D(DTOUT) $C(7) G EXIT
;
INFO ;Display Task Manager's Information
W @IOF,!!,"Here is the information that Taskman is using:"
W !?5,"Operating System: ",$P(ZTOS,U)
W !?5,"Volume Set: ",ZTVOL
W !?5,"Cpu-volume Pair: ",ZTPAIR
W !?5,"TaskMan Files UCI and Volume Set: ",$P(ZTVSS,U,6),"," S X=$P(ZTVSS,U,7) W $S(X="":ZTVOL,$D(^%ZIS(14.5,X,0))[0:ZTVOL,$P(^(0),U)="":ZTVOL,1:$P(^(0),U)) K X
W !!?5,"Log Tasks? ",$P(ZTPS,U,3)
;W !?5,"Default Task Priority: ",ZTPT ;p446
I ZTOS["DSM"&(ZTOS'["VAX"),ZTSIZ]"" W !?5,"Task Partition Size: ",ZTSIZ
W !?5,"Submanager Retention Time: ",ZTRET
W !?5,"Min Submanager Count: ",$P(ZTPS,U,12)
W !?5,"Taskman Hang Between New Jobs: ",ZTSLO
W !?5,"TaskMan running as a type: ",$P("^COMPUTE^PRINT^GENERAL^","^",$F("CPG",$P(ZTPS,U,9)))
I $P(ZTPS,U,10)]"" W !?5,"TaskMan is using VAX enviroment: ",$P(ZTPS,U,10) ;p446
I $G(^%ZIS(14.7,+ZTPN,2))]"" D
. W !?5,"TaskMan is using '",^(2),"' for load balancing"
. W !?5,"Balance Interval: ",$P(ZTPS,U,14) ;p446
. Q
;
STATUS ;Display Task Manager's Status-Related Information
W !!?5,"Logons Inhibited?: ",ZTVLI
W !?5,"Taskman Job Limit: ",ZTVMJ
I $D(^XTV(8989.3,0)) S %=$O(^XTV(8989.3,1,4,"B",ZTVOL,0)) W !?5,"Max sign-ons: ",$P($G(^XTV(8989.3,1,4,+%,0)),U,3)
X ^%ZOSF("ACTJ") W !?5,"Current number of active jobs: ",Y
;
DONE ;Prompt To Continue And Quit
W ! R !,"End of listing. Press RETURN to continue: ",Y:$S($D(DTIME)#2:DTIME,1:60) S:'$T DTOUT="" S:Y="^" DUOUT=""
EXIT Q
;
MGR ;LINKS--lookup name of another volume set's library uci
S Y=ZTX I Y]"" S Y=$O(^%ZIS(14.5,"B",Y,""))
I Y]"" S Y=$S($D(^%ZIS(14.5,Y,0))#2:$P(^(0),U,6),1:"")
I Y="" S Y=$P($P(^%ZIS(14.5,ZTVSN,0),U,6),",")
Q
;
LK ;Check one link
N $ES,$ET S $ET="D ERLINKS^ZTMCHK1"
S ZTJ=ZTJ+1,ZTX=ZTS D MGR S ZTX=$D(^[Y,ZTS]%ZOSF("PROD")) W !?5,"The link to volume set ",ZTS," is present!"
Q
;
ERLINKS ;Error Trap For LINKS Code
W !?5,"The link to volume set ",ZTS," appears to be down!",$C(7)
S $EC=""
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HZTMCHK1 2743 printed Dec 13, 2024@02:16:14 Page 2
ZTMCHK1 ;SEA/RDS-Taskman: Option, ZTMCHECK, Part 2 ;5/31/07 12:13
+1 ;;8.0;KERNEL;**127,446**;Jul 10, 1995;Build 35
+2 ;
LINKS ;Check Required Volume Sets' Links
+1 WRITE !!,"Checking the links to the required volume sets..."
+2 SET (ZTJ,ZTV)=0
+3 FOR
SET ZTV=$ORDER(^%ZIS(14.5,ZTV))
if 'ZTV
QUIT
SET ZTS=$PIECE(^(ZTV,0),U)
IF $PIECE(^(0),U,5)="Y"
IF ZTS'=ZTVOL
DO LK
+4 IF 'ZTJ
WRITE !?5,"There are no volume sets whose links are required!"
+5 WRITE !!,"Checks completed...Taskman's environment is okay!"
+6 ;
EOP ;Pause at end of page
+1 WRITE !
SET Y=""
FOR ZT=0:0
READ !,"Press RETURN to continue or '^' to exit: ",Y:$SELECT($DATA(DTIME)#2:DTIME,1:60)
if '$TEST
SET DTOUT=""
if Y="^"
SET DUOUT=""
if Y=""!(Y="^")
QUIT
WRITE !!,"Enter either RETURN or '^'",!
if Y'["?"
WRITE $CHAR(7)
+2 IF $DATA(DUOUT)!$DATA(DTOUT)
if $DATA(DTOUT)
WRITE $CHAR(7)
GOTO EXIT
+3 ;
INFO ;Display Task Manager's Information
+1 WRITE @IOF,!!,"Here is the information that Taskman is using:"
+2 WRITE !?5,"Operating System: ",$PIECE(ZTOS,U)
+3 WRITE !?5,"Volume Set: ",ZTVOL
+4 WRITE !?5,"Cpu-volume Pair: ",ZTPAIR
+5 WRITE !?5,"TaskMan Files UCI and Volume Set: ",$PIECE(ZTVSS,U,6),","
SET X=$PIECE(ZTVSS,U,7)
WRITE $SELECT(X="":ZTVOL,$DATA(^%ZIS(14.5,X,0))[0:ZTVOL,$PIECE(^(0),U)="":ZTVOL,1:$PIECE(^(0),U))
KILL X
+6 WRITE !!?5,"Log Tasks? ",$PIECE(ZTPS,U,3)
+7 ;W !?5,"Default Task Priority: ",ZTPT ;p446
+8 IF ZTOS["DSM"&(ZTOS'["VAX")
IF ZTSIZ]""
WRITE !?5,"Task Partition Size: ",ZTSIZ
+9 WRITE !?5,"Submanager Retention Time: ",ZTRET
+10 WRITE !?5,"Min Submanager Count: ",$PIECE(ZTPS,U,12)
+11 WRITE !?5,"Taskman Hang Between New Jobs: ",ZTSLO
+12 WRITE !?5,"TaskMan running as a type: ",$PIECE("^COMPUTE^PRINT^GENERAL^","^",$FIND("CPG",$PIECE(ZTPS,U,9)))
+13 ;p446
IF $PIECE(ZTPS,U,10)]""
WRITE !?5,"TaskMan is using VAX enviroment: ",$PIECE(ZTPS,U,10)
+14 IF $GET(^%ZIS(14.7,+ZTPN,2))]""
Begin DoDot:1
+15 WRITE !?5,"TaskMan is using '",^(2),"' for load balancing"
+16 ;p446
WRITE !?5,"Balance Interval: ",$PIECE(ZTPS,U,14)
+17 QUIT
End DoDot:1
+18 ;
STATUS ;Display Task Manager's Status-Related Information
+1 WRITE !!?5,"Logons Inhibited?: ",ZTVLI
+2 WRITE !?5,"Taskman Job Limit: ",ZTVMJ
+3 IF $DATA(^XTV(8989.3,0))
SET %=$ORDER(^XTV(8989.3,1,4,"B",ZTVOL,0))
WRITE !?5,"Max sign-ons: ",$PIECE($GET(^XTV(8989.3,1,4,+%,0)),U,3)
+4 XECUTE ^%ZOSF("ACTJ")
WRITE !?5,"Current number of active jobs: ",Y
+5 ;
DONE ;Prompt To Continue And Quit
+1 WRITE !
READ !,"End of listing. Press RETURN to continue: ",Y:$SELECT($DATA(DTIME)#2:DTIME,1:60)
if '$TEST
SET DTOUT=""
if Y="^"
SET DUOUT=""
EXIT QUIT
+1 ;
MGR ;LINKS--lookup name of another volume set's library uci
+1 SET Y=ZTX
IF Y]""
SET Y=$ORDER(^%ZIS(14.5,"B",Y,""))
+2 IF Y]""
SET Y=$SELECT($DATA(^%ZIS(14.5,Y,0))#2:$PIECE(^(0),U,6),1:"")
+3 IF Y=""
SET Y=$PIECE($PIECE(^%ZIS(14.5,ZTVSN,0),U,6),",")
+4 QUIT
+5 ;
LK ;Check one link
+1 NEW $ESTACK,$ETRAP
SET $ETRAP="D ERLINKS^ZTMCHK1"
+2 SET ZTJ=ZTJ+1
SET ZTX=ZTS
DO MGR
SET ZTX=$DATA(^[Y,ZTS]%ZOSF("PROD"))
WRITE !?5,"The link to volume set ",ZTS," is present!"
+3 QUIT
+4 ;
ERLINKS ;Error Trap For LINKS Code
+1 WRITE !?5,"The link to volume set ",ZTS," appears to be down!",$CHAR(7)
+2 SET $ECODE=""
+3 QUIT
+4 ;