AUCDICD ; DELETE BAD FILES [ 06/13/87 9:44 AM ]
;
S AUCDDEL=0,AUCDFILE="" F AUCDL=0:0 S AUCDFILE=$O(^UTILITY("AUDSET",$J,AUCDFILE)) Q:AUCDFILE="" S AUCDGOOD=1 D:$D(^(AUCDFILE,"ERR"))\10 ERRORS K:AUCDGOOD ^UTILITY("AUDSET",$J,AUCDFILE)
I AUCDDEL W !!,"Executing ^%AUKD to delete specified files!" D EN2^%AUKD
K AUCDDEL,AUCDFILE,AUCDGOOD,AUCDX,AUCDNDIC
Q
;
ERRORS ; RESOLVE ERRORS SET BY ^AUCDIC2 OR ^AUCDIC3
W !
S AUCDX="" F AUCDL=0:0 S AUCDX=$O(^UTILITY("AUDSET",$J,AUCDFILE,"ERR",AUCDX)) Q:AUCDX="" W !,^(AUCDX)
ACTR R !!," Delete file? (Y/N) ",AUCDX I AUCDX'="Y"&(AUCDX'="N") W *7," ??" G ACTR
S:AUCDX="Y" AUCDDEL=1,AUCDGOOD=0,^UTILITY("AUDSET",$J,AUCDFILE)="A^A"
K ^UTILITY("AUDSET",$J,AUCDFILE,"ERR")
Q
AUCDICD ; DELETE BAD FILES [ 06/13/87 9:44 AM ]
+1 ;
+2 SET AUCDDEL=0
SET AUCDFILE=""
FOR AUCDL=0:0
SET AUCDFILE=$ORDER(^UTILITY("AUDSET",$JOB,AUCDFILE))
IF AUCDFILE=""
QUIT
SET AUCDGOOD=1
IF $DATA(^(AUCDFILE,"ERR"))\10
DO ERRORS
IF AUCDGOOD
KILL ^UTILITY("AUDSET",$JOB,AUCDFILE)
+3 IF AUCDDEL
WRITE !!,"Executing ^%AUKD to delete specified files!"
DO EN2^%AUKD
+4 KILL AUCDDEL,AUCDFILE,AUCDGOOD,AUCDX,AUCDNDIC
+5 QUIT
+6 ;
ERRORS ; RESOLVE ERRORS SET BY ^AUCDIC2 OR ^AUCDIC3
+1 WRITE !
+2 SET AUCDX=""
FOR AUCDL=0:0
SET AUCDX=$ORDER(^UTILITY("AUDSET",$JOB,AUCDFILE,"ERR",AUCDX))
IF AUCDX=""
QUIT
WRITE !,^(AUCDX)
ACTR READ !!," Delete file? (Y/N) ",AUCDX
IF AUCDX'="Y"&(AUCDX'="N")
WRITE *7," ??"
GOTO ACTR
+1 IF AUCDX="Y"
SET AUCDDEL=1
SET AUCDGOOD=0
SET ^UTILITY("AUDSET",$JOB,AUCDFILE)="A^A"
+2 KILL ^UTILITY("AUDSET",$JOB,AUCDFILE,"ERR")
+3 QUIT