Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XBCDICD

XBCDICD.m

Go to the documentation of this file.
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
 ;