VistA-IHS-VA_UTILITIES-XB/XBCDICD.m

24 lines
831 B
Mathematica
Raw Normal View History

XBCDICD ; IHS/ADC/GTH - DELETE BAD FILES ; [ 02/07/97 3:02 PM ]
;;4.0;XB;;Jul 20, 2009;Build 2
;
; Part of XBCDIC
;
START ;
S XBCDDEL=0,XBCDFILE=""
F XBCDL=0:0 S XBCDFILE=$O(^UTILITY("XBDSET",$J,XBCDFILE)) Q:XBCDFILE="" S XBCDGOOD=1 D:$D(^(XBCDFILE,"ERR"))\10 ERRORS K:XBCDGOOD ^UTILITY("XBDSET",$J,XBCDFILE)
I XBCDDEL W !!,"Executing ^XBKD to delete specified files!" D EN2^XBKD
KILL XBCDDEL,XBCDFILE,XBCDGOOD,XBCDX,XBCDNDIC
Q
;
ERRORS ; RESOLVE ERRORS SET BY ^XBCDIC2 OR ^XBCDIC3
W !
S XBCDX=""
F XBCDL=0:0 S XBCDX=$O(^UTILITY("XBDSET",$J,XBCDFILE,"ERR",XBCDX)) Q:XBCDX="" W !,^(XBCDX)
ACTR ;
R !!," Delete file? (Y/N) ",XBCDX:$G(DTIME,999)
I XBCDX'="Y"&(XBCDX'="N") W *7," ??" G ACTR
S:XBCDX="Y" XBCDDEL=1,XBCDGOOD=0,^UTILITY("XBDSET",$J,XBCDFILE)="A^A"
KILL ^UTILITY("XBDSET",$J,XBCDFILE,"ERR")
Q
;