COMPILE ROUTINE FIX_WO_STEP(Dummy)
ROWDEF(CHARSTR)

DECLARE SUBROUTINE obj_Schedule,Send_Dyn,Send_Info, obj_WO_Log, Set_Status, obj_WO_Step, obj_WM_In, obj_WM_Out
DECLARE FUNCTION Get_Status, Set_Printer, obj_WO_Step

$INSERT WO_STEP_EQUATES
$INSERT PROD_SPEC_EQU
$INSERT WO_LOG_EQU
$INSERT RDS_EQU
$INSERT RLIST_EQUATES


OPEN 'WO_STEP' TO WOStepFile ELSE
	DEBUG 
	GOTO Bail
END


OPEN 'RDS' TO RDSTable ELSE
	DEBUG
	GOTO Bail
END

ClearSelect


DEBUG

WOStepRec = XLATE('WO_STEP','149655*1','','X')

RDSNos = WOStepRec<WO_STEP_RDS_KEY$>

RDSCnt = COUNT(RDSNos,@VM) + (RDSNos NE '')

FOR I = 1 TO RDSCnt
	RDSNo = RDSNos<1,I>
	
	RDSRec = ''
	RDSRec<RDS_WO_STEP_KEY$> = '149655*1'
	WRITE RDSRec ON RDSTable,RDSNo THEN
		DELETE RDSTable,RDSNo THEN
			NULL
		END
	END
NEXT I


GOTO Bail




IF Get_Status(errCode) THEN DEBUG


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

END
