Clearing OpenInsight SYSLISTS Table
The SYSLISTS table in OpenInsight can become cluttered with old records and much like a TEMP directory it can and should be cleared out. When it comes time to clear the table the clear_table command won't work because SYSLISTS is a protected system table. Instead the easiest thing is to simply select and delete all the records.
Here is a sample routine to do the task.
Function CS_CLEAR_SYSLISTS(params)
$Insert Logical
CounterSuccess = 0 ; CounterFail = 0 ; done = FALSE$
TableName = 'SYSLISTS'
Open TableName to Table Else
	Call Msg("Couldn't open table " : TableName)
	Return
End
Select Table
loop
	readnext @ID Else Done = TRUE$
until done
	
	delete Table, @ID Then 
		CounterSuccess += 1
	End Else
		CounterFail += 1
	End	
repeat
Call Msg("Deleted " : CounterSuccess : " recs from " : TableName : "|" : CounterFail : " could not be deleted")
Return
Simply compile and run the routine to purge all of the SYSLISTS records. Not all of the SYSLISTS records are old, this is an active table used for ongoing tasks by the system so it should only be cleared when the system is not in use and after checking there are no saved lists that are still needed.
 
		       
  
Comments (2)
Alternatively, this System Monitor command seems to bypass the System Table check:
RUN DELETE_ROW 'SYSLISTS', '*'
Cheers, M@
Thanks for sharing the tip! This is especially useful since it doesn't require additional routines.
Leave a comment