XBSDDAUD ;IHS/SET/GTH - SET DICTIONARY AUDIT(S) ; [ 10/29/2002 7:42 AM ]
;;3.0;IHS/VA UTILITIES;**9**;FEB 07, 1997
;IHS/SET/GTH XB*3*9 10/29/2002 New Routine.
; This routine allows you to toggle the dictionary (dd) audit
; flag for selected files. The global location for dictionary
; audit is: ^DD(FILE,0,"DDA")
; If the valuey is "Y", dd audit is on. Any other value, or the
; absence of the node, means dd audit is off.
;
START ;
W !!,"^XBSDDAUD - This routine toggles the data dictionary audit flag(s)."
D ^XBDSET
Q:'$D(^UTILITY("XBDSET",$J))
D DEV
Q:POP
D DISP
Q:'$$DIR^XBDIR("Y","Proceed to toggling dd audit for file(s)","N")
D SET
KILL X,Y,^UTILITY("XBDSET",$J)
Q
;
DISP ; Display current dd audit values for file(s).
NEW F,G,P
W !,"File #",?15,"File Name",?50,"Global",?65,"dd Audit On/Off"
F F=0:0 S F=$O(^UTILITY("XBDSET",$J,F)) Q:F'=+F D
. S G=$G(^DIC(F,0,"GL"))
. S P=$G(^DD(F,0,"DDA"))
. W !,F,?15,$$FNAME^XBFUNC(F),?50,G,?65,$S(P="Y":"on",1:"off")
.Q
;
Q
;
DEV ; Select device for report.
W !
S %=$$PB
I %=U!$D(DTOUT)!$D(DUOUT) Q
I %="B" D VIEWR^XBLM("DISP^XBSDDAUD"),EN^XBVK("VALM") Q
D ^%ZIS
Q
;
PB() ;
Q $$DIR^XBDIR("SO^P:PRINT Output;B:BROWSE Output on Screen","Do you want to ","PRINT","","","",2)
;
SET ; Set DDA for the file(s).
NEW F,G,P,Y
S Y=$$DIR^XBDIR("S^1:ON;2:OFF","Set 'dd audit' ON or OFF?","OFF")
Q:$D(DUOUT)!$D(DTOUT)
S Y=$S(Y=1:"Y",1:"")
W !
F F=0:0 S F=$O(^UTILITY("XBDSET",$J,F)) Q:F'=+F D
. Q:'$D(^DD(F))
. S ^DD(F,0,"DDA")=Y
. W !,F," set ",$S(Y="Y":"on",1:"off")
.Q
;
Q
;
XBSDDAUD ;IHS/SET/GTH - SET DICTIONARY AUDIT(S) ; [ 10/29/2002 7:42 AM ]
+1 ;;3.0;IHS/VA UTILITIES;**9**;FEB 07, 1997
+2 ;IHS/SET/GTH XB*3*9 10/29/2002 New Routine.
+3 ; This routine allows you to toggle the dictionary (dd) audit
+4 ; flag for selected files. The global location for dictionary
+5 ; audit is: ^DD(FILE,0,"DDA")
+6 ; If the valuey is "Y", dd audit is on. Any other value, or the
+7 ; absence of the node, means dd audit is off.
+8 ;
START ;
+1 WRITE !!,"^XBSDDAUD - This routine toggles the data dictionary audit flag(s)."
+2 DO ^XBDSET
+3 IF '$DATA(^UTILITY("XBDSET",$JOB))
QUIT
+4 DO DEV
+5 IF POP
QUIT
+6 DO DISP
+7 IF '$$DIR^XBDIR("Y","Proceed to toggling dd audit for file(s)","N")
QUIT
+8 DO SET
+9 KILL X,Y,^UTILITY("XBDSET",$JOB)
+10 QUIT
+11 ;
DISP ; Display current dd audit values for file(s).
+1 NEW F,G,P
+2 WRITE !,"File #",?15,"File Name",?50,"Global",?65,"dd Audit On/Off"
+3 FOR F=0:0
SET F=$ORDER(^UTILITY("XBDSET",$JOB,F))
IF F'=+F
QUIT
Begin DoDot:1
+4 SET G=$GET(^DIC(F,0,"GL"))
+5 SET P=$GET(^DD(F,0,"DDA"))
+6 WRITE !,F,?15,$$FNAME^XBFUNC(F),?50,G,?65,$SELECT(P="Y":"on",1:"off")
+7 QUIT
End DoDot:1
+8 ;
+9 QUIT
+10 ;
DEV ; Select device for report.
+1 WRITE !
+2 SET %=$$PB
+3 IF %=U!$DATA(DTOUT)!$DATA(DUOUT)
QUIT
+4 IF %="B"
DO VIEWR^XBLM("DISP^XBSDDAUD")
DO EN^XBVK("VALM")
QUIT
+5 DO ^%ZIS
+6 QUIT
+7 ;
PB() ;
+1 QUIT $$DIR^XBDIR("SO^P:PRINT Output;B:BROWSE Output on Screen","Do you want to ","PRINT","","","",2)
+2 ;
SET ; Set DDA for the file(s).
+1 NEW F,G,P,Y
+2 SET Y=$$DIR^XBDIR("S^1:ON;2:OFF","Set 'dd audit' ON or OFF?","OFF")
+3 IF $DATA(DUOUT)!$DATA(DTOUT)
QUIT
+4 SET Y=$SELECT(Y=1:"Y",1:"")
+5 WRITE !
+6 FOR F=0:0
SET F=$ORDER(^UTILITY("XBDSET",$JOB,F))
IF F'=+F
QUIT
Begin DoDot:1
+7 IF '$DATA(^DD(F))
QUIT
+8 SET ^DD(F,0,"DDA")=Y
+9 WRITE !,F," set ",$SELECT(Y="Y":"on",1:"off")
+10 QUIT
End DoDot:1
+11 ;
+12 QUIT
+13 ;