XBCDICD ; IHS/ADC/GTH - DELETE BAD FILES ; [ 02/07/97 3:02 PM ]
;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
;
; 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
;
XBCDICD ; IHS/ADC/GTH - DELETE BAD FILES ; [ 02/07/97 3:02 PM ]
+1 ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
+2 ;
+3 ; Part of XBCDIC
+4 ;
START ;
+1 SET XBCDDEL=0
SET XBCDFILE=""
+2 FOR XBCDL=0:0
SET XBCDFILE=$ORDER(^UTILITY("XBDSET",$JOB,XBCDFILE))
IF XBCDFILE=""
QUIT
SET XBCDGOOD=1
IF $DATA(^(XBCDFILE,"ERR"))\10
DO ERRORS
IF XBCDGOOD
KILL ^UTILITY("XBDSET",$JOB,XBCDFILE)
+3 IF XBCDDEL
WRITE !!,"Executing ^XBKD to delete specified files!"
DO EN2^XBKD
+4 KILL XBCDDEL,XBCDFILE,XBCDGOOD,XBCDX,XBCDNDIC
+5 QUIT
+6 ;
ERRORS ; RESOLVE ERRORS SET BY ^XBCDIC2 OR ^XBCDIC3
+1 WRITE !
+2 SET XBCDX=""
+3 FOR XBCDL=0:0
SET XBCDX=$ORDER(^UTILITY("XBDSET",$JOB,XBCDFILE,"ERR",XBCDX))
IF XBCDX=""
QUIT
WRITE !,^(XBCDX)
ACTR ;
+1 READ !!," Delete file? (Y/N) ",XBCDX:$GET(DTIME,999)
+2 IF XBCDX'="Y"&(XBCDX'="N")
WRITE *7," ??"
GOTO ACTR
+3 IF XBCDX="Y"
SET XBCDDEL=1
SET XBCDGOOD=0
SET ^UTILITY("XBDSET",$JOB,XBCDFILE)="A^A"
+4 KILL ^UTILITY("XBDSET",$JOB,XBCDFILE,"ERR")
+5 QUIT
+6 ;