COMPILE ROUTINE COUNT_RDS_Layer(Dummy)
ROWDEF(CHARSTR)

DECLARE SUBROUTINE obj_Schedule,Send_Dyn,Send_Info, Send_Dyn, obj_WO_Step, Set_Status, Btree.Extract, obj_RDS, RList, ErrMsg
DECLARE SUBROUTINE obj_Tables
DECLARE FUNCTION Get_Status, Set_Printer, obj_RDS, ErrMsg, obj_Tables

$INSERT RDS_EQU
$INSERT WO_LOG_EQU
$INSERT ORDER_EQU
$INSERT PROD_SPEC_EQU

EQU TARGET_ACTIVELIST$ TO 5


OPEN 'RDS' TO FileOut ELSE
	debug
	GOTO Bail
END

OPEN 'RDS_LAYER' TO FileIn ELSE
	debug
	GOTO Bail
END

SELECT FileIn

DEBUG

LockedRecords = ''
Done = 0
RecCnt = 0
LOOP
	READNEXT LayerKey ELSE Done = 1
UNTIL DONE
	RecCnt += 1
	Send_Info(RecCnt)
REPEAT

DEBUG


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

END
