XBFRESET ; IHS/ADC/GTH - RESET FILE GLOBALS ; [ 02/07/97 3:02 PM ]
;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
;
; This routine removes all data from FileMan files by
; saving the 0th node, killing the global, then resetting
; the 0th node.
;
START ;
NEW I
W !!,$$REPEAT^XLFSTR("*",78),!,"This routine kills file data globals and resets the 0th nodes. If you are not",!,"absolutely sure of what you are doing, please ^ out at the first opportunity!",!,$$REPEAT^XLFSTR("*",78),!!
F I=1:1:3 W *7,"*** WARNING ***" H 1 W:I'=3 *13,$J("",79),*13
KILL I
W !!,"Select the files you wish reset."
D ^XBDSET
EN1 ;PEP - Interactive entry, files already selected.
Q:'$D(^UTILITY("XBDSET",$J))
W !!,"The following files globals will be killed and reset.",!
H 2
D EN^XBLZRO
Q:'$$DIR^XBDIR("Y","Do you want to continue","NO","","","",1)
EN2 ;PEP - Non-interactive entry, files already selected.
NEW F,G,X,Y
S F=""
F S F=$O(^UTILITY("XBDSET",$J,F)) Q:F="" D
. Q:'$D(^DIC(F,0,"GL")) S G=^("GL")
. S Y=G_"0)"
. S G=$E(G,1,$L(G)-1)_$S($E(G,$L(G))="(":"",1:")")
. W:'$D(ZTQUEUED) "."
. S X=@Y,X=$P(X,"^",1,2)_"^0^0"
. KILL @G
. S @Y=X
. Q
KILL ^UTILITY("XBDSET",$J)
Q
;
XBFRESET ; IHS/ADC/GTH - RESET FILE GLOBALS ; [ 02/07/97 3:02 PM ]
+1 ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
+2 ;
+3 ; This routine removes all data from FileMan files by
+4 ; saving the 0th node, killing the global, then resetting
+5 ; the 0th node.
+6 ;
START ;
+1 NEW I
+2 WRITE !!,$$REPEAT^XLFSTR("*",78),!,"This routine kills file data globals and resets the 0th nodes. If you are not",!,"absolutely sure of what you are doing, please ^ out at the first opportunity!",!,$$REPEAT^XLFSTR("*",78),!!
+3 FOR I=1:1:3
WRITE *7,"*** WARNING ***"
HANG 1
IF I'=3
WRITE *13,$JUSTIFY("",79),*13
+4 KILL I
+5 WRITE !!,"Select the files you wish reset."
+6 DO ^XBDSET
EN1 ;PEP - Interactive entry, files already selected.
+1 IF '$DATA(^UTILITY("XBDSET",$JOB))
QUIT
+2 WRITE !!,"The following files globals will be killed and reset.",!
+3 HANG 2
+4 DO EN^XBLZRO
+5 IF '$$DIR^XBDIR("Y","Do you want to continue","NO","","","",1)
QUIT
EN2 ;PEP - Non-interactive entry, files already selected.
+1 NEW F,G,X,Y
+2 SET F=""
+3 FOR
SET F=$ORDER(^UTILITY("XBDSET",$JOB,F))
IF F=""
QUIT
Begin DoDot:1
+4 IF '$DATA(^DIC(F,0,"GL"))
QUIT
SET G=^("GL")
+5 SET Y=G_"0)"
+6 SET G=$EXTRACT(G,1,$LENGTH(G)-1)_$SELECT($EXTRACT(G,$LENGTH(G))="(":"",1:")")
+7 IF '$DATA(ZTQUEUED)
WRITE "."
+8 SET X=@Y
SET X=$PIECE(X,"^",1,2)_"^0^0"
+9 KILL @G
+10 SET @Y=X
+11 QUIT
End DoDot:1
+12 KILL ^UTILITY("XBDSET",$JOB)
+13 QUIT
+14 ;