ZTMCHK ;SEA/RDS-Taskman: Option, ZTMCHECK, Part 1 ;01/12/95 08:12
;;8.0;KERNEL;;Jul 10, 1995
;
N ZTF,ZTJ,ZTN,ZTOS,ZTPAIR,ZTPN,ZTPS,ZTPT,ZTRET,ZTS,ZTSIZ,ZTSLO,ZTV,ZTVLI,ZTVMJ,ZTVOL,ZTVSN,ZTVSS,ZTX,DTOUT,DUOUT,X,Y
CHECK ;Main Entry Point For Environment Check
S U="^",%ZIS="",IOP="HOME" D ^%ZIS
W @IOF,!!,"Checking Task Manager's Environment."
;
GLOB ;Checking Task Manager's Globals
W !!,"Checking Taskman's globals..."
F ZT="^%ZTSCH","^%ZTSK","^%ZTSK(-1)","^%ZIS(14.5,0)","^%ZIS(14.6,0)","^%ZIS(14.7,0)" D
. W !?5,ZT," is ",$S($D(@ZT):"",1:"not "),"defined!" W:'$D(@ZT) $C(7)
. Q
;
NODES ;Check Required %ZOSF Nodes
W !!,"Checking the ^%ZOSF nodes required by Taskman..."
S ZTF=1 F ZTN="ACTJ","AVJ","MAXSIZ","MGR","OS","PROD","TRAP","UCI","UCICHECK","VOL" D
. I $D(^%ZOSF(ZTN))[0 W !?5,"^%ZOSF('",ZTN,"') is missing!",$C(7) S ZTF=0
. Q
I 'ZTF K ZTF,ZTN Q
W !?5,"All ^%ZOSF nodes required by Taskman are defined!"
;
D LOOKUP
CONT ;program is continued in ZTMCHK1
G ^ZTMCHK1
;
LOOKUP ;lookup TaskMan site parameters
N Y D GETENV^%ZOSV S ZTVOL=$P(Y,U,2),ZTPAIR=$P(Y,U,4)
S ZTOS=^%ZOSF("OS")
S ZTVSN=$O(^%ZIS(14.5,"B",ZTVOL,""))
S ZTVSS=$G(^%ZIS(14.5,+ZTVSN,0))
S ZTVLI=$P(ZTVSS,U,2)
;
S ZTPN=$O(^%ZIS(14.7,"B",ZTPAIR,"")),ZTPS=$G(^%ZIS(14.7,+ZTPN,0))
S ZTPT=$P(ZTPS,U,4),ZTSIZ=+$P(ZTPS,U,5)
I 'ZTSIZ,ZTOS'["VAX DSM",ZTOS["DSM" S ZTSIZ=32
S ZTRET=+$P(ZTPS,U,6),ZTVMJ=+$P(ZTPS,U,7),ZTSLO=+$P(ZTPS,U,8)
Q
;
PARAMS ;
N ZTF,ZTJ,ZTN,ZTOS,ZTPAIR,ZTPN,ZTPS,ZTPT,ZTRET,ZTS,ZTSIZ,ZTSLO,ZTV,ZTVLI,ZTVMJ,ZTVOL,ZTVSN,ZTVSS,ZTX,DTOUT,DUOUT,X,Y
D LOOKUP,INFO^ZTMCHK1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HZTMCHK 1631 printed Oct 16, 2024@18:17:01 Page 2
ZTMCHK ;SEA/RDS-Taskman: Option, ZTMCHECK, Part 1 ;01/12/95 08:12
+1 ;;8.0;KERNEL;;Jul 10, 1995
+2 ;
+3 NEW ZTF,ZTJ,ZTN,ZTOS,ZTPAIR,ZTPN,ZTPS,ZTPT,ZTRET,ZTS,ZTSIZ,ZTSLO,ZTV,ZTVLI,ZTVMJ,ZTVOL,ZTVSN,ZTVSS,ZTX,DTOUT,DUOUT,X,Y
CHECK ;Main Entry Point For Environment Check
+1 SET U="^"
SET %ZIS=""
SET IOP="HOME"
DO ^%ZIS
+2 WRITE @IOF,!!,"Checking Task Manager's Environment."
+3 ;
GLOB ;Checking Task Manager's Globals
+1 WRITE !!,"Checking Taskman's globals..."
+2 FOR ZT="^%ZTSCH","^%ZTSK","^%ZTSK(-1)","^%ZIS(14.5,0)","^%ZIS(14.6,0)","^%ZIS(14.7,0)"
Begin DoDot:1
+3 WRITE !?5,ZT," is ",$SELECT($DATA(@ZT):"",1:"not "),"defined!"
if '$DATA(@ZT)
WRITE $CHAR(7)
+4 QUIT
End DoDot:1
+5 ;
NODES ;Check Required %ZOSF Nodes
+1 WRITE !!,"Checking the ^%ZOSF nodes required by Taskman..."
+2 SET ZTF=1
FOR ZTN="ACTJ","AVJ","MAXSIZ","MGR","OS","PROD","TRAP","UCI","UCICHECK","VOL"
Begin DoDot:1
+3 IF $DATA(^%ZOSF(ZTN))[0
WRITE !?5,"^%ZOSF('",ZTN,"') is missing!",$CHAR(7)
SET ZTF=0
+4 QUIT
End DoDot:1
+5 IF 'ZTF
KILL ZTF,ZTN
QUIT
+6 WRITE !?5,"All ^%ZOSF nodes required by Taskman are defined!"
+7 ;
+8 DO LOOKUP
CONT ;program is continued in ZTMCHK1
+1 GOTO ^ZTMCHK1
+2 ;
LOOKUP ;lookup TaskMan site parameters
+1 NEW Y
DO GETENV^%ZOSV
SET ZTVOL=$PIECE(Y,U,2)
SET ZTPAIR=$PIECE(Y,U,4)
+2 SET ZTOS=^%ZOSF("OS")
+3 SET ZTVSN=$ORDER(^%ZIS(14.5,"B",ZTVOL,""))
+4 SET ZTVSS=$GET(^%ZIS(14.5,+ZTVSN,0))
+5 SET ZTVLI=$PIECE(ZTVSS,U,2)
+6 ;
+7 SET ZTPN=$ORDER(^%ZIS(14.7,"B",ZTPAIR,""))
SET ZTPS=$GET(^%ZIS(14.7,+ZTPN,0))
+8 SET ZTPT=$PIECE(ZTPS,U,4)
SET ZTSIZ=+$PIECE(ZTPS,U,5)
+9 IF 'ZTSIZ
IF ZTOS'["VAX DSM"
IF ZTOS["DSM"
SET ZTSIZ=32
+10 SET ZTRET=+$PIECE(ZTPS,U,6)
SET ZTVMJ=+$PIECE(ZTPS,U,7)
SET ZTSLO=+$PIECE(ZTPS,U,8)
+11 QUIT
+12 ;
PARAMS ;
+1 NEW ZTF,ZTJ,ZTN,ZTOS,ZTPAIR,ZTPN,ZTPS,ZTPT,ZTRET,ZTS,ZTSIZ,ZTSLO,ZTV,ZTVLI,ZTVMJ,ZTVOL,ZTVSN,ZTVSS,ZTX,DTOUT,DUOUT,X,Y
+2 DO LOOKUP
DO INFO^ZTMCHK1
+3 QUIT