XBSAUD ; IHS/ADC/GTH - SET AUDIT AT FILE LEVEL ; [ 02/07/97 3:02 PM ]
;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
;
; This routine sets 'audit' on at the file level for
; selected files
;
START ;
W !!,"^XBSAUD - This routine sets 'audit' at the file level."
D ^XBDSET
Q:'$D(^UTILITY("XBDSET",$J))
NEW F,G,P
S Y=$$DIR^XBDIR("S^1:ON;2:OFF","Set 'audit' ON or OFF?","ON")
Q:$D(DUOUT)!$D(DTOUT)
S Y=Y-1
W !
F F=0:0 S F=$O(^UTILITY("XBDSET",$J,F)) Q:F'=+F D
. S G=^DIC(F,0,"GL")
. S P=$P(@(G_"0)"),"^",2)
. I Y S P=$P(P,"a",1)_$P(P,"a",2) I 1
. E S P=P_$S(P'["a":"a",1:"")
. S $P(@(G_"0)"),"^",2)=P
. W !,F," set ",$S(Y:"off",1:"on")
.Q
D EOJ
Q
;
EOJ ;
KILL X,Y,^UTILITY("XBDSET",$J)
Q
;
XBSAUD ; IHS/ADC/GTH - SET AUDIT AT FILE LEVEL ; [ 02/07/97 3:02 PM ]
+1 ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
+2 ;
+3 ; This routine sets 'audit' on at the file level for
+4 ; selected files
+5 ;
START ;
+1 WRITE !!,"^XBSAUD - This routine sets 'audit' at the file level."
+2 DO ^XBDSET
+3 IF '$DATA(^UTILITY("XBDSET",$JOB))
QUIT
+4 NEW F,G,P
+5 SET Y=$$DIR^XBDIR("S^1:ON;2:OFF","Set 'audit' ON or OFF?","ON")
+6 IF $DATA(DUOUT)!$DATA(DTOUT)
QUIT
+7 SET Y=Y-1
+8 WRITE !
+9 FOR F=0:0
SET F=$ORDER(^UTILITY("XBDSET",$JOB,F))
IF F'=+F
QUIT
Begin DoDot:1
+10 SET G=^DIC(F,0,"GL")
+11 SET P=$PIECE(@(G_"0)"),"^",2)
+12 IF Y
SET P=$PIECE(P,"a",1)_$PIECE(P,"a",2)
IF 1
+13 IF '$TEST
SET P=P_$SELECT(P'["a":"a",1:"")
+14 SET $PIECE(@(G_"0)"),"^",2)=P
+15 WRITE !,F," set ",$SELECT(Y:"off",1:"on")
+16 QUIT
End DoDot:1
+17 DO EOJ
+18 QUIT
+19 ;
EOJ ;
+1 KILL X,Y,^UTILITY("XBDSET",$JOB)
+2 QUIT
+3 ;