Created
November 11, 2019 13:41
-
-
Save jbratu/34151af5a161116e46d2b055b55c52be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Subroutine CS_LIST_TABLES_AND_CLEAR(void) | |
Declare Function Get_Status, List_Index_Detailed | |
declare function Set_FSError, CS_RLIST_UTIL, Dialog_box, List_Volume_Sub | |
declare subroutine RLIST | |
$Insert Logical | |
Volume = 'C:\SomePath\Volume\ToClean' | |
Tables = List_Volume_Sub(Volume,'','','') | |
TablesCount = DCOUNT(Tables, @FM) | |
TablesToClear = '' | |
TablesWithIndexes = '' | |
For i = 1 To TablesCount | |
Table = Tables<i,1> | |
If Table[1,1] NE '!' and Table[1,5] NE 'DICT.' then | |
TablesToClear<-1> = Table | |
end | |
If Table[1,1] EQ '!' then | |
TablesWithIndexes<-1> = Table | |
end | |
Next i | |
Table = '' | |
TablesToClearCount = DCOUNT(TablesToClear,@FM) | |
For i = 1 TO TablesToClearCount | |
Table = TablesToClear<i> | |
Call Clear_Table(Table) | |
Next i | |
TablesWithIndexesCount = DCOUNT(TablesWithIndexes, @FM) | |
For i = 1 To TablesWithIndexesCount | |
Table = TablesWithIndexes<i> | |
Call Update_Index(Table, "", "") | |
Next i | |
Debug | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment