COMPILE ROUTINE FIX_AUDIT(Dummy)
ROWDEF (CHARSTR)

DECLARE SUBROUTINE SEND_INFO, SEND_DYN, RList,Btree.Extract, Set_Status, Get_Status, Clear_File



Today = XLATE('SQL_ERROR',"2015-01-21",'','X')



DEBUG




GOTO Bail


debug

Tables  = 'AUDIT_CLEAN_INSP':@FM
Tables := 'AUDIT_NCR':@FM
Tables := 'AUDIT_PROD_SPEC':@FM
Tables := 'AUDIT_RDS':@FM
Tables := 'AUDIT_RDS_LAYER':@FM
Tables := 'AUDIT_RDS_TEST':@FM
Tables := 'AUDIT_REACTOR_LOG':@FM
Tables := 'AUDIT_REACTOR_MODE':@FM
Tables := 'AUDIT_REACTOR_RUN':@FM
Tables := 'AUDIT_RECIPE':@FM
Tables := 'AUDIT_TOOL_LOG':@FM
Tables := 'AUDIT_WM_OUT':@FM
Tables := 'AUDIT_WO_LOG':@FM
Tables := 'AUDIT_WO_MAST_SCHED':@FM
Tables := 'AUDIT_WO_MAT'

Tables  = 'AUDIT_REACT_MODE':@FM
Tables := 'AUDIT_REACT_RUN':@FM


TableCnt = COUNT(Tables,@FM) + (Tables NE '')

FOR I = 1 to TableCnt
	Table = Tables<I>
	
	DEBUG
	
	OPEN Table TO FileVar THEN
	
		ClearFile FileVar THEN
			Send_Dyn(Table)
		END ELSE
			Get_Status(errCode)
			DEBUG
		END
	END

NEXT I




* * * * * * *
Bail:
* * * * * * *

END
