COMPILE ROUTINE CLEAN_UP_SYSLISTS(Dummy)
ROWDEF(CHARSTR)

DECLARE SUBROUTINE Send_Dyn,Send_Infom, RList, RList, ErrMsg
DECLARE SUBROUTINE Set_Status, Send_Info, 
DECLARE FUNCTION Get_Status, Set_Printer, Popup

$INSERT ORDER_EQU
$INSERT WO_LOG_EQU
$INSERT WO_STEP_EQU
$INSERT SCHEDULE_EQU
$INSERT RDS_EQU
$INSERT RLIST_EQUATES
$INSERT POPUP_EQUATES

OPEN 'SYSLISTS' TO FileIn ELSE
	DEBUG
	RETURN
END


IF Get_Status(errCode) THEN DEBUG

SelectStatement = 'SELECT SYSLISTS'

RList(SelectStatement, TARGET_ACTIVELIST$, '','','')

IF Get_Status(errCode) THEN
	ErrMsg(errCode)
	DEBUG
	GOTO Bail
END

DEBUG

Done = 0
RecCnt = 0
LOOP
	READNEXT ID ELSE Done = 1
UNTIL Done
	
	

		READ Rec FROM FileIn,ID THEN
			RecCnt += 1
			*DELETE FileIn,ID THEN
				Send_Dyn(ID)
				Send_Info(RecCnt:' ':ID)
			*END
		END

REPEAT






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

END
