COMPILE ROUTINE FIX_SURF_SCAN(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 FUNCTION Get_Status, Set_Printer, obj_RDS, ErrMsg

$INSERT RDS_EQU
$INSERT PROD_SPEC_EQU

EQU TARGET_ACTIVELIST$ TO 5


OPEN 'DICT.SURF_SCAN' TO DictVar ELSE
	debug
	GOTO Bail
END

OPEN 'SURF_SCAN' TO FileIn ELSE
	debug
	GOTO Bail
END

OPEN 'RDS' TO FileOut ELSE
	debug
	GOTO Bail
END

SELECT FileIn


RecCnt = 0
Done = 0
LOOP
	READNEXT SSKey ELSE Done = 1
UNTIL Done
	RecCnt += 1
	Send_Info(RecCnt)
	IF INDEX(SSKey,@SVM,1) OR SSKey[1,'*'] = '0' THEN
		
		READ FungedRec FROM FileIn,SSKey THEN
			debug
			DELETE FileIn,SSkey ELSE NULL
		END
	END
REPEAT




DEBUG

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

END
