Function Test_Crisp4()
#pragma precomp SRP_PreCompiler
equ crlf$ to \0D0A\
$Insert LOGICAL
Declare function Replication_Services
Declare subroutine Database_Services

    Open 'REPLICATION_QUEUE_LSL2_RDS' to TableHandle then
        Select TableHandle
        EOF = False$
        Loop
            ReadNext @ID else EOF = True$
        Until EOF
            If Not(Num(@ID)) and Not(Index(@ID, '%', 1)) then
                Delete TableHandle, @ID then Null
            end
        Repeat
    end
    
    
return
    
* 
* Flag          = ''
* RDSTestKeyIDs = ''
* RDSNo = ''
* hDictRDSTest  = Database_Services('GetTableHandle', 'DICT.RDS_TEST')
* SearchString  = 'RDS_NO' : @VM : RDSNo : @FM
* Btree.Extract(SearchString, 'RDS_TEST', hDictRDSTest, RDSTestKeyIDs, '', Flag)
* If Flag EQ 0 then
*    If RDSTestKeyIDs NE '' then
*        For Each RDSTestKeyID in RDSTestKeyIDs using @VM
*            If Len(RDSTestKeyID) LT 7 then
*                Database_Services('DeleteDataRow', 'RDS_TEST', RDSTestKeyID, True$)
*                If Error_Services('NoError') then
*                    Results = RDSTestKeyID : ' deleted'
*                end else
*                    Results = RDSTestKeyID : ' not deleted. Error : ' : Error_Services('GetMessage')
*                end
*                LogData<1> = LoggingDTM
*                LogData<2> = Results
*                Logging_Services('AppendLog', objLog2, LogData, @RM, @FM)
*            end
*        Next RDSTestKeyID
*    end
* end
* 
* 
* return
* 
* fileName = "d:\temp\Replication_keys.txt"
* open 'REPLICATION_QUEUE_LSL2_REACT_RUN' to REP_TABLE then
* select REP_TABLE
* 	done = 0
* 	report=''
*debug
* 	loop
*		readnext @ID Else Done = 1
* 	until done
*		read REC from REP_TABLE, @ID then
*			report := REC<5>:crlf$
*		end
* 	repeat
* end else
* 	return 'Open_Error'
* end
* 
* OSWrite report To filename
* 
* return
