NVSMENU ;WJW,JLS/OIOFO - CACHE Systems Utility 1/21/06 NOON
;;1.8
;
INIT S U="^",$P(DASH,"-",80)="" S:'$D(DTIME) DTIME=300 D HOME^%ZIS
;
K DIR
S DIR(0)="SO^R:Routine Utilities;G:Global Utilities;Z:$ZU Calls"
S DIR("A")="Select one of the above items, or '^' to quit"
W ! D ^DIR
I Y<0!($D(DIRUT)) G EXIT
S USRSEL=Y K X,Y S DISTYPE=$S(USRSEL="R":"ROUTINE",USRSEL="G":"GLOBAL",USRSEL="Z":"$ZU CALL",1:"")
LIST S MAX=0 K NVSARR W @IOF,!,"#",?6,"CACHE ",DISTYPE," UTILITY SET",?50,"ITEM",!,DASH,!
F NUM=1:1 S LINE=$P($T(@USRSEL+NUM),";;",2) Q:LINE="" D I $Y>(IOSL-4) S DIR(0)="E",DIR("A")="Press RETURN to go back to the list" W ! D ^DIR W @IOF
.S ITEM=$P(LINE,";"),COMD=$P(LINE,";",2),TYPE=$P(LINE,";",3),OOS=$P(LINE,";",4)
.Q:TYPE'=USRSEL
.W !,NUM,?6,ITEM,?50,COMD I $G(OOS)]"" W ?75,OOS
.S NVSARR(NUM)=ITEM
.S MAX=MAX+1
.Q
SELECT K DIR S DIR(0)="NO^1:"_MAX_"",DIR("A")="Select Cache Utility item number to run or '^' to quit"
S DIR("?")="^D MENU^NVSHELP" W ! D ^DIR
I Y<0!($D(DIRUT)) G MENU
S LINE=$P($T(@USRSEL+Y),";;",2,999)
S ITEM=$P(LINE,";"),COMD=$P(LINE,";",2),TYPE=$P(LINE,";",3),OOS=$P(LINE,";",4),ROUHID=$P(LINE,";",5),ROUSPL=$P(LINE,";",6),OBJTAG=$P(LINE,";",7),ROUAXP=$P(LINE,";",8)
I OOS]"" W !!,"<<< This utility is currently not available, please choose another item. >>>" H 3 G MENU
ROUCHK I TYPE="R" D I $G(NOROU)=-1 G LIST
.K NOROU
.I $G(ROUHID)="" D
..I $G(ROUSPL)="O" D
...I '$$EXIST^%R(COMD_".OBJ") S NOROU=-1 D NOROU
...Q
..I $G(ROUSPL)'="O" D
...I '$L($T(@COMD)) S NOROU=-1 D NOROU
...Q
..Q
.I $G(ROUHID)]"" D
..I '$L($T(@ROUHID)) S NOROU=-1 D NOROU
..Q
.Q
DOIT W !!,"--- ",ITEM," ---",!
S ITEM=$P(LINE,";"),COMD=$P(LINE,";",2),TYPE=$P(LINE,";",3),OOS=$P(LINE,";",4),ROUHID=$P(LINE,";",5),ROUSPL=$P(LINE,";",6),OBJTAG=$P(LINE,";",7)
I OOS]"" W !!,"<<< This utility is currently not available, please choose another item. >>>" H 3 G MENU
I USRSEL="R" I COMD["NVSMENU" D G:$G(NVSKEEP)=1 LIST Q
.S NVSKEEP=1
.I $G(ROUHID)]"" D @ROUHID ; -- 'SHOW' and 'CHANGE'
.Q
I USRSEL="R"!(USRSEL="G") D G LIST
.I $G(OBJTAG)]"" S COMD=OBJTAG_U_COMD
.I $G(COMD)]"" I $G(ROUHID)="" H 2 W @IOF D @COMD
.I $G(COMD)]"" I $G(ROUHID)]"" H 2 W @IOF D @ROUHID
.K DIR S DIR(0)="E",DIR("A")="Press RETURN to continue" W !! D ^DIR
.Q
I USRSEL="Z" D G LIST
.W !
.I $G(ROUSPL)="" W !,@COMD
.I $G(ROUSPL)="S" D @COMD
.K DIR S DIR(0)="E",DIR("A")="Press RETURN to continue" W !! D ^DIR
.Q
Q
;
NOROU ; -- display info for missing routine(s) --
W !!,"<<< Routine ",COMD," is not found in the routine directory. >>>",!
W !,"This routine can be retrieved from an FTP server at DOWNLOAD.VISTA.DOMAIN.EXT"
W !,"in the [ANONYMOUS.VSTS.AXP.CACHECONV] directory, or you can log a Remedy ticket"
W !,"for assistance."
I $G(ROUAXP)]"" D
.W !!,"This routine is described in ",ROUAXP," and can be reviewed on FORUM in the"
.W !,"Shared Mail AXP ",$S(ROUAXP["ALERT":"ALERT",1:"INFO")," MESSAGE mail basket or at the VSTS Technical Support Team"
.W !,"web address at http://vaww.domain.ext/custsvc/cssupp/axp/",!
.Q
K DIR S DIR(0)="E",DIR("A")="Press RETURN to continue"
W ! D ^DIR
Q
; -----------------------------------------------------------------------
;
; to add a new item, add new line with format in group section at the
; END of the group list to preserve the item number order, and also
; update help routine NVSHELP for online doc for the new item.
;
; ;;$p1 - menu item display name
; ; $p2 - routine or $zu call
; ; $p3 - item type 'R', 'G', 'Z'
; ; $p4 - out of service message
; ; $p5 - hidden routine call
; ; $p6 - 'S' denotes TAG call in NVSMENU or 'O' for object code
; ; $p7 - if object code routine, this is the tag called
; ; $p8 - associated AXP message reference with 'Alert' or 'Info'
;
; -----------------------------------------------------------------------
Q
R ; --- ROUTINE MENU ITEMS ---
;;VistA and VMS device setup;^NVSMKPRN;R;;;;
;;Start/Stop TM/Broker/Mailman;^NVSSTB;R;;;;
;;System wide System Status;^NVSVCSS;R;;;;
;;Show current namespace and DAT;^%DIR;R;;;;
;;Show defined namespaces;LIST^%NSP;R;;;;
;;Show info about current Namespace;SHOW^NVSMENU;R;;SHOW;S
;;Change Namespace;CD^NVSMENU;R;;CD;S
;;Show DAT file;DSET^NVSMENU;R;;DSET;S
;;Change to a different DAT file;CHANGE^NVSMENU;R;;CHANGE;S
;;Clean Inactive Job Nodes in TMP;^NVSTMPC;R;;;;
;;Check Enhanced Cube Security;%ZVASEC;R;;;O;info;AXP Info #27
;;Check Cache DCL Level Security;%ZVASDCL;R;;;O;DCLinfo;AXP Info #27
;;Free Block Counts for configuration files;ALL^%FREECNT;R;;;;
;;Display Cluster Master;REHASH^NVSMENU;R;;REHASH;S
;;HL Link Ping Test;PING^HLMA;R;;;;
;;Show System Error Log;SYSLOG^NVSMENU;R;;SYSLOG;S
;;Queue Management;QUEMGT^NVSMENU;R;;QUEMGT;S
Q
G ; --- GLOBAL MENU ITEMS ---
;;Show Mapping for a global;^NVSMENU;G;;GLX;S
;;Get node counts in a global;^NVSLOOP;G;;;;
Q
Z ; --- $ZU CALL MENU ITEMS ---
;;Show current config signed into;$ZU(86);Z;;;;
;;Show namespace;$ZU(5);Z;;;;
;;Show VMS node name;$ZU(110);Z;;;;
;;Primary MAC address;$ZU(114,0);Z;;;;
;;Ethernet Device;$ZU(114,1);Z;;;;
;;Show Current Journal File;$ZU(78,3);Z;;;;
;;Journaling Status (Started/Stopped?);JSTAT;Z;;;S;
;;Allow unsubscripted kills (this session);KILLYES;Z;;;S;
;;Disallow unsubscripted kills (this session);KILLNO;Z;;;S;
Q
; --------------------------------------------------------------------
CALLS ; ROUTINE/GLOBAL/$ZU CALLS WITHIN NVSMENU ROUTINE
; --------------------------------------------------------------------
;
JSTAT H 2 W "Journaling ",$S(+$ZU(78,22)=1:"started.",1:"stopped.")
Q
;
KILLYES H 2 S X=$ZU(68,28,0) W "<<< WARNING: Unsubscripted Kills Allowed! >>>" K X
Q
;
KILLNO H 2 S X=$ZU(68,28,1) W "Good: Unsubscripted Kills *NOT* Allowed." K X
Q
;
REHASH K DIR,NVSCMD,NVSYS,X
S NVSYS=$P($ZU(86),"*",2) I $G(NVSYS)="" W !!,"Unable to resolve configuration name!" H 2 Q
S NVSCMD="CACHE/ENV="_NVSYS_" ""-U%SYS"" ""^REHASH"""
H 2 X "S X=$ZF(-1,NVSCMD)" K NVSCMD,NVSYS,X
K DIR S DIR(0)="E",DIR("A")="Press RETURN to continue" W ! D ^DIR
Q
;
DSET H 2 S %U="",MGDIR="%SYS" F %I=0:0 S %U=$O(^|MGDIR|SYS("UCI",%U)) W !,%U Q:%U=""
K DIR S DIR(0)="E",DIR("A")="Press RETURN to continue" W ! D ^DIR
Q
;
GLX K DIR,NVS,NVSCHAR,NVSFLAG,NVSG,NVSGU,NSP,X,Y
S DIR(0)="FO",DIR("A")="Enter Global Name without the '^'"
S DIR("?")="^W !,"" --- Global Listing ---"",! D ^%GD"
H 2 W ! D ^DIR
I Y<0!($D(DIRUT)) K DIR,NVSG,NVSGU Q
S NVSFLAG=1 D I NVSFLAG=0 W !!,"<<< Global name contains erroneous characters, please try again! >>>",! G GLX
.K NVSCHAR
.F NVS=1:1:$L(Y) Q:NVSFLAG=0 S NVSCHAR(NVS)=$E(Y,NVS) D
..I $A(NVSCHAR(NVS))=37 Q ; -- percent "%" okay --
..I $A(NVSCHAR(NVS))>32 I $A(NVSCHAR(NVS))<48 S NVSFLAG=0 Q ; -- "!" to "/" ascii range --
..I $A(NVSCHAR(NVS))>57 I $A(NVSCHAR(NVS))<65 S NVSFLAG=0 Q ; -- ":" to "@" ascii range --
..I $A(NVSCHAR(NVS))>90 I $A(NVSCHAR(NVS))<97 S NVSFLAG=0 Q ; -- "[" to "'" ascii range --
..Q
.Q
S NVSG=Y,NVSGU=U_Y
I '$D(@NVSGU) W !,"No such global.",! G GLX
S NSP=$ZU(90,4)
W !!,NVSG," in namespace ",NSP," is mapped to: ",$$getdest^%GXLINF1(NSP,NVSG) G GLX
Q
;
CD W !,"<<< WARNING - This will switch to another namespace and exit this utility! >>>",!
K DIR S DIR(0)="Y",DIR("A")="Do you want to continue",DIR("B")="NO"
H 2 W ! D ^DIR W !
I Y=0!($D(DIRUT)) Q
W !!,"To switch back use utility D ^%CD and enter ",$ZU(5),!
K NVSKEEP D EXIT D ^%CD
Q
;
SHOW H 2 S NSP=$ZU(5) D SHOW^%NSP(NSP)
K DIR S DIR(0)="E",DIR("A")="Press RETURN to continue" W ! D ^DIR
Q
;
CHANGE K DIR,NVSDIR,X,Y
H 2 W !,"<<< WARNING - This will switch to another DAT file and exit this utility! >>>",!
K DIR S DIR(0)="Y",DIR("A")="Do you want to continue",DIR("B")="NO"
W ! D ^DIR W !
I Y=0!($D(DIRUT)) Q
K DIR S DIR(0)="F^3:30",DIR("A")="Enter the DAT you want to change to (ex: VAA,VBB,ZSHARE)"
S DIR("?")="^S %U="""",MGDIR=""%SYS"" F %I=0:0 S %U=$O(^|MGDIR|SYS(""UCI"",%U)) W !,%U Q:%U="""""
W ! D ^DIR
I Y<0!($D(DIRUT)) K DIR,X,Y Q
I Y=$ZU(90,4) W !,"Please use utility D ^%CD to switch back to default namespace." H 2 K DIR,X,Y Q
D I NVSDIR="" W !!,"<<< DAT file not found, please try again >>>",! H 2 G CHANGE
.S %U="",NVSDIR="",MGDIR="%SYS"
.F %I=0:0 S %U=$O(^|MGDIR|SYS("UCI",%U)) S:%U[Y NVSDIR=%U Q:%U=""
.Q
W !,"Changing to ",NVSDIR S NVSDIR="^^"_NVSDIR
W !!,"To switch back use utility D ^%CD and enter ",$ZU(90,4),!
D EXIT X ("ZR O:NVSDIR?1""^^"".e 63:NVSDIR I $ZU(5,NVSDIR)") K NVSDIR,NVSKEEP
Q
;
SYSLOG ; -- show Cache System Error Log entries --
H 2
D SCREEN^|"%SYS"|SYSLOG K %ST
Q
;
QUEMGT ; -- call Carl's queue_management_menu.com in USER$:[AXP] --
H 2
N NVSCHK,NVSFILE,NVSPEC S NVSPEC("QUEUE_MANAGEMENT_MENU.COM")="" S NVSCHK=$$LIST^%ZISH("USER$:[AXP]","NVSPEC","NVSFILE")
I NVSCHK=0 D Q
.W !,"<<< File QUEUE_MANAGEMENT_MENU.COM not found in the USER$:[AXP] directory. >>>",!
.W !,"This file can be retrieved from an FTP server at DOWNLOAD.VISTA.DOMAIN.EXT"
.W !,"in the [ANONYMOUS.VSTS.AXP.CACHECONV] directory, or you can log",!,"a Remedy ticket for assistance."
.K DIR S DIR(0)="E",DIR("A")="Press RETURN to continue" W ! D ^DIR
.Q
W !,"This item provides a sub-menu of options to manage vms queues.",!
N X S X=$ZF(-1,"@USER$:[AXP]QUEUE_MANAGEMENT_MENU")
Q
;
EXIT K COMD,DASH,DIR,DIRUT,DISTYPE,I,ITEM,LINE,MAX,MENUFLAG,MGDIR,NOROU,NSP,NUM,NVSG
K NVSARR,NVSGU,NVSKEEP,NVSNS,OBJTAG,OOS,POP,ROUAXP,ROUHID,ROUSPL,TYPE,USRSEL,X,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HNVSMENU 9886 printed Dec 13, 2024@02:17:34 Page 2
+1 ;;1.8
+2 ;
INIT SET U="^"
SET $PIECE(DASH,"-",80)=""
if '$DATA(DTIME)
SET DTIME=300
DO HOME^%ZIS
+1 ;
+1 KILL DIR
+2 SET DIR(0)="SO^R:Routine Utilities;G:Global Utilities;Z:$ZU Calls"
+3 SET DIR("A")="Select one of the above items, or '^' to quit"
+4 WRITE !
DO ^DIR
+5 IF Y<0!($DATA(DIRUT))
GOTO EXIT
+6 SET USRSEL=Y
KILL X,Y
SET DISTYPE=$SELECT(USRSEL="R":"ROUTINE",USRSEL="G":"GLOBAL",USRSEL="Z":"$ZU CALL",1:"")
LIST SET MAX=0
KILL NVSARR
WRITE @IOF,!,"#",?6,"CACHE ",DISTYPE," UTILITY SET",?50,"ITEM",!,DASH,!
+1 FOR NUM=1:1
SET LINE=$PIECE($TEXT(@USRSEL+NUM),";;",2)
if LINE=""
QUIT
Begin DoDot:1
+2 SET ITEM=$PIECE(LINE,";")
SET COMD=$PIECE(LINE,";",2)
SET TYPE=$PIECE(LINE,";",3)
SET OOS=$PIECE(LINE,";",4)
+3 if TYPE'=USRSEL
QUIT
+4 WRITE !,NUM,?6,ITEM,?50,COMD
IF $GET(OOS)]""
WRITE ?75,OOS
+5 SET NVSARR(NUM)=ITEM
+6 SET MAX=MAX+1
+7 QUIT
End DoDot:1
IF $Y>(IOSL-4)
SET DIR(0)="E"
SET DIR("A")="Press RETURN to go back to the list"
WRITE !
DO ^DIR
WRITE @IOF
SELECT KILL DIR
SET DIR(0)="NO^1:"_MAX_""
SET DIR("A")="Select Cache Utility item number to run or '^' to quit"
+1 SET DIR("?")="^D MENU^NVSHELP"
WRITE !
DO ^DIR
+2 IF Y<0!($DATA(DIRUT))
GOTO MENU
+3 SET LINE=$PIECE($TEXT(@USRSEL+Y),";;",2,999)
+4 SET ITEM=$PIECE(LINE,";")
SET COMD=$PIECE(LINE,";",2)
SET TYPE=$PIECE(LINE,";",3)
SET OOS=$PIECE(LINE,";",4)
SET ROUHID=$PIECE(LINE,";",5)
SET ROUSPL=$PIECE(LINE,";",6)
SET OBJTAG=$PIECE(LINE,";",7)
SET ROUAXP=$PIECE(LINE,";",8)
+5 IF OOS]""
WRITE !!,"<<< This utility is currently not available, please choose another item. >>>"
HANG 3
GOTO MENU
ROUCHK IF TYPE="R"
Begin DoDot:1
+1 KILL NOROU
+2 IF $GET(ROUHID)=""
Begin DoDot:2
+3 IF $GET(ROUSPL)="O"
Begin DoDot:3
+4 IF '$$EXIST^%R(COMD_".OBJ")
SET NOROU=-1
DO NOROU
+5 QUIT
End DoDot:3
+6 IF $GET(ROUSPL)'="O"
Begin DoDot:3
+7 IF '$LENGTH($TEXT(@COMD))
SET NOROU=-1
DO NOROU
+8 QUIT
End DoDot:3
+9 QUIT
End DoDot:2
+10 IF $GET(ROUHID)]""
Begin DoDot:2
+11 IF '$LENGTH($TEXT(@ROUHID))
SET NOROU=-1
DO NOROU
+12 QUIT
End DoDot:2
+13 QUIT
End DoDot:1
IF $GET(NOROU)=-1
GOTO LIST
DOIT WRITE !!,"--- ",ITEM," ---",!
+1 SET ITEM=$PIECE(LINE,";")
SET COMD=$PIECE(LINE,";",2)
SET TYPE=$PIECE(LINE,";",3)
SET OOS=$PIECE(LINE,";",4)
SET ROUHID=$PIECE(LINE,";",5)
SET ROUSPL=$PIECE(LINE,";",6)
SET OBJTAG=$PIECE(LINE,";",7)
+2 IF OOS]""
WRITE !!,"<<< This utility is currently not available, please choose another item. >>>"
HANG 3
GOTO MENU
+3 IF USRSEL="R"
IF COMD["NVSMENU"
Begin DoDot:1
+4 SET NVSKEEP=1
+5 ; -- 'SHOW' and 'CHANGE'
IF $GET(ROUHID)]""
DO @ROUHID
+6 QUIT
End DoDot:1
if $GET(NVSKEEP)=1
GOTO LIST
QUIT
+7 IF USRSEL="R"!(USRSEL="G")
Begin DoDot:1
+8 IF $GET(OBJTAG)]""
SET COMD=OBJTAG_U_COMD
+9 IF $GET(COMD)]""
IF $GET(ROUHID)=""
HANG 2
WRITE @IOF
DO @COMD
+10 IF $GET(COMD)]""
IF $GET(ROUHID)]""
HANG 2
WRITE @IOF
DO @ROUHID
+11 KILL DIR
SET DIR(0)="E"
SET DIR("A")="Press RETURN to continue"
WRITE !!
DO ^DIR
+12 QUIT
End DoDot:1
GOTO LIST
+13 IF USRSEL="Z"
Begin DoDot:1
+14 WRITE !
+15 IF $GET(ROUSPL)=""
WRITE !,@COMD
+16 IF $GET(ROUSPL)="S"
DO @COMD
+17 KILL DIR
SET DIR(0)="E"
SET DIR("A")="Press RETURN to continue"
WRITE !!
DO ^DIR
+18 QUIT
End DoDot:1
GOTO LIST
+19 QUIT
+20 ;
NOROU ; -- display info for missing routine(s) --
+1 WRITE !!,"<<< Routine ",COMD," is not found in the routine directory. >>>",!
+2 WRITE !,"This routine can be retrieved from an FTP server at DOWNLOAD.VISTA.DOMAIN.EXT"
+3 WRITE !,"in the [ANONYMOUS.VSTS.AXP.CACHECONV] directory, or you can log a Remedy ticket"
+4 WRITE !,"for assistance."
+5 IF $GET(ROUAXP)]""
Begin DoDot:1
+6 WRITE !!,"This routine is described in ",ROUAXP," and can be reviewed on FORUM in the"
+7 WRITE !,"Shared Mail AXP ",$SELECT(ROUAXP["ALERT":"ALERT",1:"INFO")," MESSAGE mail basket or at the VSTS Technical Support Team"
+8 WRITE !,"web address at http://vaww.domain.ext/custsvc/cssupp/axp/",!
+9 QUIT
End DoDot:1
+10 KILL DIR
SET DIR(0)="E"
SET DIR("A")="Press RETURN to continue"
+11 WRITE !
DO ^DIR
+12 QUIT
+13 ; -----------------------------------------------------------------------
+1 ;
+2 ; to add a new item, add new line with format in group section at the
+3 ; END of the group list to preserve the item number order, and also
+4 ; update help routine NVSHELP for online doc for the new item.
+5 ;
+6 ; ;;$p1 - menu item display name
+7 ; ; $p2 - routine or $zu call
+8 ; ; $p3 - item type 'R', 'G', 'Z'
+9 ; ; $p4 - out of service message
+10 ; ; $p5 - hidden routine call
+11 ; ; $p6 - 'S' denotes TAG call in NVSMENU or 'O' for object code
+12 ; ; $p7 - if object code routine, this is the tag called
+13 ; ; $p8 - associated AXP message reference with 'Alert' or 'Info'
+14 ;
+15 ; -----------------------------------------------------------------------
+16 QUIT
R ; --- ROUTINE MENU ITEMS ---
+1 ;;VistA and VMS device setup;^NVSMKPRN;R;;;;
+2 ;;Start/Stop TM/Broker/Mailman;^NVSSTB;R;;;;
+3 ;;System wide System Status;^NVSVCSS;R;;;;
+4 ;;Show current namespace and DAT;^%DIR;R;;;;
+5 ;;Show defined namespaces;LIST^%NSP;R;;;;
+6 ;;Show info about current Namespace;SHOW^NVSMENU;R;;SHOW;S
+7 ;;Change Namespace;CD^NVSMENU;R;;CD;S
+8 ;;Show DAT file;DSET^NVSMENU;R;;DSET;S
+9 ;;Change to a different DAT file;CHANGE^NVSMENU;R;;CHANGE;S
+10 ;;Clean Inactive Job Nodes in TMP;^NVSTMPC;R;;;;
+11 ;;Check Enhanced Cube Security;%ZVASEC;R;;;O;info;AXP Info #27
+12 ;;Check Cache DCL Level Security;%ZVASDCL;R;;;O;DCLinfo;AXP Info #27
+13 ;;Free Block Counts for configuration files;ALL^%FREECNT;R;;;;
+14 ;;Display Cluster Master;REHASH^NVSMENU;R;;REHASH;S
+15 ;;HL Link Ping Test;PING^HLMA;R;;;;
+16 ;;Show System Error Log;SYSLOG^NVSMENU;R;;SYSLOG;S
+17 ;;Queue Management;QUEMGT^NVSMENU;R;;QUEMGT;S
+18 QUIT
G ; --- GLOBAL MENU ITEMS ---
+1 ;;Show Mapping for a global;^NVSMENU;G;;GLX;S
+2 ;;Get node counts in a global;^NVSLOOP;G;;;;
+3 QUIT
Z ; --- $ZU CALL MENU ITEMS ---
+1 ;;Show current config signed into;$ZU(86);Z;;;;
+2 ;;Show namespace;$ZU(5);Z;;;;
+3 ;;Show VMS node name;$ZU(110);Z;;;;
+4 ;;Primary MAC address;$ZU(114,0);Z;;;;
+5 ;;Ethernet Device;$ZU(114,1);Z;;;;
+6 ;;Show Current Journal File;$ZU(78,3);Z;;;;
+7 ;;Journaling Status (Started/Stopped?);JSTAT;Z;;;S;
+8 ;;Allow unsubscripted kills (this session);KILLYES;Z;;;S;
+9 ;;Disallow unsubscripted kills (this session);KILLNO;Z;;;S;
+10 QUIT
+11 ; --------------------------------------------------------------------
CALLS ; ROUTINE/GLOBAL/$ZU CALLS WITHIN NVSMENU ROUTINE
+1 ; --------------------------------------------------------------------
+2 ;
JSTAT HANG 2
WRITE "Journaling ",$SELECT(+$ZU(78,22)=1:"started.",1:"stopped.")
+1 QUIT
+2 ;
KILLYES HANG 2
SET X=$ZU(68,28,0)
WRITE "<<< WARNING: Unsubscripted Kills Allowed! >>>"
KILL X
+1 QUIT
+2 ;
KILLNO HANG 2
SET X=$ZU(68,28,1)
WRITE "Good: Unsubscripted Kills *NOT* Allowed."
KILL X
+1 QUIT
+2 ;
REHASH KILL DIR,NVSCMD,NVSYS,X
+1 SET NVSYS=$PIECE($ZU(86),"*",2)
IF $GET(NVSYS)=""
WRITE !!,"Unable to resolve configuration name!"
HANG 2
QUIT
+2 SET NVSCMD="CACHE/ENV="_NVSYS_" ""-U%SYS"" ""^REHASH"""
+3 HANG 2
XECUTE "S X=$ZF(-1,NVSCMD)"
KILL NVSCMD,NVSYS,X
+4 KILL DIR
SET DIR(0)="E"
SET DIR("A")="Press RETURN to continue"
WRITE !
DO ^DIR
+5 QUIT
+6 ;
DSET HANG 2
SET %U=""
SET MGDIR="%SYS"
FOR %I=0:0
SET %U=$ORDER(^|MGDIR|SYS("UCI",%U))
WRITE !,%U
if %U=""
QUIT
+1 KILL DIR
SET DIR(0)="E"
SET DIR("A")="Press RETURN to continue"
WRITE !
DO ^DIR
+2 QUIT
+3 ;
GLX KILL DIR,NVS,NVSCHAR,NVSFLAG,NVSG,NVSGU,NSP,X,Y
+1 SET DIR(0)="FO"
SET DIR("A")="Enter Global Name without the '^'"
+2 SET DIR("?")="^W !,"" --- Global Listing ---"",! D ^%GD"
+3 HANG 2
WRITE !
DO ^DIR
+4 IF Y<0!($DATA(DIRUT))
KILL DIR,NVSG,NVSGU
QUIT
+5 SET NVSFLAG=1
Begin DoDot:1
+6 KILL NVSCHAR
+7 FOR NVS=1:1:$LENGTH(Y)
if NVSFLAG=0
QUIT
SET NVSCHAR(NVS)=$EXTRACT(Y,NVS)
Begin DoDot:2
+8 ; -- percent "%" okay --
IF $ASCII(NVSCHAR(NVS))=37
QUIT
+9 ; -- "!" to "/" ascii range --
IF $ASCII(NVSCHAR(NVS))>32
IF $ASCII(NVSCHAR(NVS))<48
SET NVSFLAG=0
QUIT
+10 ; -- ":" to "@" ascii range --
IF $ASCII(NVSCHAR(NVS))>57
IF $ASCII(NVSCHAR(NVS))<65
SET NVSFLAG=0
QUIT
+11 ; -- "[" to "'" ascii range --
IF $ASCII(NVSCHAR(NVS))>90
IF $ASCII(NVSCHAR(NVS))<97
SET NVSFLAG=0
QUIT
+12 QUIT
End DoDot:2
+13 QUIT
End DoDot:1
IF NVSFLAG=0
WRITE !!,"<<< Global name contains erroneous characters, please try again! >>>",!
GOTO GLX
+14 SET NVSG=Y
SET NVSGU=U_Y
+15 IF '$DATA(@NVSGU)
WRITE !,"No such global.",!
GOTO GLX
+16 SET NSP=$ZU(90,4)
+17 WRITE !!,NVSG," in namespace ",NSP," is mapped to: ",$$getdest^%GXLINF1(NSP,NVSG)
GOTO GLX
+18 QUIT
+19 ;
CD WRITE !,"<<< WARNING - This will switch to another namespace and exit this utility! >>>",!
+1 KILL DIR
SET DIR(0)="Y"
SET DIR("A")="Do you want to continue"
SET DIR("B")="NO"
+2 HANG 2
WRITE !
DO ^DIR
WRITE !
+3 IF Y=0!($DATA(DIRUT))
QUIT
+4 WRITE !!,"To switch back use utility D ^%CD and enter ",$ZU(5),!
+5 KILL NVSKEEP
DO EXIT
DO ^%CD
+6 QUIT
+7 ;
SHOW HANG 2
SET NSP=$ZU(5)
DO SHOW^%NSP(NSP)
+1 KILL DIR
SET DIR(0)="E"
SET DIR("A")="Press RETURN to continue"
WRITE !
DO ^DIR
+2 QUIT
+3 ;
CHANGE KILL DIR,NVSDIR,X,Y
+1 HANG 2
WRITE !,"<<< WARNING - This will switch to another DAT file and exit this utility! >>>",!
+2 KILL DIR
SET DIR(0)="Y"
SET DIR("A")="Do you want to continue"
SET DIR("B")="NO"
+3 WRITE !
DO ^DIR
WRITE !
+4 IF Y=0!($DATA(DIRUT))
QUIT
+5 KILL DIR
SET DIR(0)="F^3:30"
SET DIR("A")="Enter the DAT you want to change to (ex: VAA,VBB,ZSHARE)"
+6 SET DIR("?")="^S %U="""",MGDIR=""%SYS"" F %I=0:0 S %U=$O(^|MGDIR|SYS(""UCI"",%U)) W !,%U Q:%U="""""
+7 WRITE !
DO ^DIR
+8 IF Y<0!($DATA(DIRUT))
KILL DIR,X,Y
QUIT
+9 IF Y=$ZU(90,4)
WRITE !,"Please use utility D ^%CD to switch back to default namespace."
HANG 2
KILL DIR,X,Y
QUIT
+10 Begin DoDot:1
+11 SET %U=""
SET NVSDIR=""
SET MGDIR="%SYS"
+12 FOR %I=0:0
SET %U=$ORDER(^|MGDIR|SYS("UCI",%U))
if %U[Y
SET NVSDIR=%U
if %U=""
QUIT
+13 QUIT
End DoDot:1
IF NVSDIR=""
WRITE !!,"<<< DAT file not found, please try again >>>",!
HANG 2
GOTO CHANGE
+14 WRITE !,"Changing to ",NVSDIR
SET NVSDIR="^^"_NVSDIR
+15 WRITE !!,"To switch back use utility D ^%CD and enter ",$ZU(90,4),!
+16 DO EXIT
XECUTE ("ZR O:NVSDIR?1""^^"".e 63:NVSDIR I $ZU(5,NVSDIR)")
KILL NVSDIR,NVSKEEP
+17 QUIT
+18 ;
SYSLOG ; -- show Cache System Error Log entries --
+1 HANG 2
+2 DO SCREEN^|"%SYS"|SYSLOG
KILL %ST
+3 QUIT
+4 ;
QUEMGT ; -- call Carl's queue_management_menu.com in USER$:[AXP] --
+1 HANG 2
+2 NEW NVSCHK,NVSFILE,NVSPEC
SET NVSPEC("QUEUE_MANAGEMENT_MENU.COM")=""
SET NVSCHK=$$LIST^%ZISH("USER$:[AXP]","NVSPEC","NVSFILE")
+3 IF NVSCHK=0
Begin DoDot:1
+4 WRITE !,"<<< File QUEUE_MANAGEMENT_MENU.COM not found in the USER$:[AXP] directory. >>>",!
+5 WRITE !,"This file can be retrieved from an FTP server at DOWNLOAD.VISTA.DOMAIN.EXT"
+6 WRITE !,"in the [ANONYMOUS.VSTS.AXP.CACHECONV] directory, or you can log",!,"a Remedy ticket for assistance."
+7 KILL DIR
SET DIR(0)="E"
SET DIR("A")="Press RETURN to continue"
WRITE !
DO ^DIR
+8 QUIT
End DoDot:1
QUIT
+9 WRITE !,"This item provides a sub-menu of options to manage vms queues.",!
+10 NEW X
SET X=$ZF(-1,"@USER$:[AXP]QUEUE_MANAGEMENT_MENU")
+11 QUIT
+12 ;
EXIT KILL COMD,DASH,DIR,DIRUT,DISTYPE,I,ITEM,LINE,MAX,MENUFLAG,MGDIR,NOROU,NSP,NUM,NVSG
+1 KILL NVSARR,NVSGU,NVSKEEP,NVSNS,OBJTAG,OOS,POP,ROUAXP,ROUHID,ROUSPL,TYPE,USRSEL,X,Y
+2 QUIT