COMPILE SUBROUTINE REACT_RUN_RDS(RDSNo)

DECLARE SUBROUTINE obj_Schedule,Send_Dyn,Send_Info, Send_Dyn, obj_WO_Step, Set_Status
DECLARE FUNCTION Get_Status, Set_Printer, obj_RDS, obj_Prod_Spec


$INSERT RDS_EQU
$INSERT PROD_SPEC_EQU
$INSERT REACT_RUN_EQUATES

$INSERT SURFACE_SCAN_EQUATES
$INSERT QUOTE_SPEC_EQU
$INSERT WO_MAT_EQUATES
$INSERT WO_LOG_EQUATES


IF NOT(ASSIGNED(RDSNo)) THEN RETURN

OPEN 'RDS' TO RDSTable ELSE
	GOTO Bail
END


OPEN 'REACT_RUN' TO RRTable ELSE
	GOTO Bail
END

OPEN 'WO_MAT' TO WOMatTable ELSE

	GOTO Bail
END



READ RunRec FROM RRTable,RDSNo THEN
	
	WONo	= RunRec<REACT_RUN_WO_NO$>
	WOStep	= RunRec<REACT_RUN_WO_STEP$>
	CassNo	= RunRec<REACT_RUN_CASS_NO$>
	
	WORec		= XLATE('WO_LOG',WONo,'','X')
	WOMatRec	= XLATE('WO_MAT',WONo:'*':CassNo,'','X')
	
	RDSRec = XLATE('RDS',RDSNo,'','X')
	
	RDSRec<RDS_WO$>					= WONo
	RDSRec<RDS_WO_STEP_KEY$>		= WONo:'*':WOStep
	RDSRec<RDS_CASS_NO$>			= CassNo
	
	RDSRec<RDS_QUOTE_NO$>			= WORec<WO_LOG_QUOTE_NO$>
	RDSRec<RDS_ORDER_NO$>			= WORec<WO_LOG_ORDER_NO$>
	RDSRec<RDS_ORDER_ITEM$>			= WOMatRec<WO_MAT_ORDER_ITEM$>
	RDSRec<RDS_CUST_NO$>			= XLATE('WO_LOG',WONo,'CUST_NO','X')
	RDSRec<RDS_PO$>					= WORec<WO_LOG_CUST_PO_NO$>
	RDSRec<RDS_PROD_SPEC_ID$>		= XLATE('WO_STEP',WONo:'*':WOStep,1,'X')
	RDSRec<RDS_COMMIT_DATE_FINAL$>	= XLATE('WO_LOG',WONo,'COMMIT_DATE','X')
	RDSRec<RDS_LOT_NUM$>			= WOMatRec<WO_MAT_LOT_NO$>
	RDSRec<RDS_PART_NUM$>			= WOMatRec<WO_MAT_CUST_PART_NO$>

	RDSRec<RDS_CASS_WAFER_QTY$>		= WOMatRec<WO_MAT_WAFER_QTY$>
	*RDSRec<RDS_QXJFLAG$>			= QXJFlag
	RDSRec<RDS_SUB_PART_NO$>		= WOMatRec<WO_MAT_SUB_PART_NO$>
	RDSRec<RDS_LAST_STEP$>			= XLATE('WO_LOG',WONo,WO_LOG_WO_STEP_KEY$,'X')[-1,'B':@VM]
	
	PSN = RDSRec<RDS_PROD_SPEC_ID$>
	
	SubstrateSpec	= XLATE('PROD_SPEC',PSN,PROD_SPEC_SPEC_SUBSTRATE$,'X')
	
	
	RDSRec<RDS_SUB_SUPPLIED_BY$>	= SubstrateSpec<1,QSSubWafersSupBy$>
	RDSRec<RDS_SUB_PRE_CLEAN$>		= SubstrateSpec<1,QSSubPreClean$>
	RDSRec<RDS_SUB_POST_CLEAN$>		= SubstrateSpec<1,QSSubPostClean$>
		
	RDSRec<RDS_ENTRY_ID$>		= RunRec<REACT_RUN_ENTER_BY$>
	
	EntryDTM = OCONV(RunRec<REACT_RUN_ENTER_DTM$>,'DT/4^HS')
	
	RDSRec<RDS_ENTRY_DATE$> 	= ICONV(FIELD(EntryDTM,' ',1),'D')
	RDSRec<RDS_ENTRY_TIME$>		= ICONV(FIELD(EntryDTM,' ',2),'MTS')
	
	RDSRec<RDS_REACTOR$>		= RunRec<REACT_RUN_REACTOR$>
	RDSRec<RDS_SHIFT$>			= RunRec<REACT_RUN_SHIFT$>
	RDSRec<RDS_LOAD_LOCK_SIDE$>	= RunRec<REACT_RUN_LOAD_LOCK_SIDE$>
	RDSRec<RDS_LAST_WAFER_RHO$>	= RunRec<REACT_RUN_LAST_WAFER_RHO$>
	RDSRec<RDS_SPECIAL_INST$>	= RunRec<REACT_RUN_SPECIAL_INST$>
	RDSRec<RDS_RDS_LAYER_KEYS$>	= RunRec<REACT_RUN_RDS_LAYER_KEYS$>
	RDSRec<RDS_VERIFY_QTY$>		= RunRec<REACT_RUN_VER_WFR_CNT$>
	RDSRec<RDS_WAFERS_IN$>		= RunRec<REACT_RUN_LOAD_WFR_CNT$>
	
	RDSRec<RDS_ADE_READ$>			= RunRec<REACT_RUN_ADE_READ$>
	RDSRec<RDS_INJECTORS$>			= RunRec<REACT_RUN_INJECTORS$>
	RDSRec<RDS_TUBE_ID$>			= RunRec<REACT_RUN_TUBE_ID$>
	RDSRec<RDS_TUBE_GRADE$>			= RunRec<REACT_RUN_TUBE_GRADE$>
	RDSRec<RDS_SUSCEPTOR_ID$>		= RunRec<REACT_RUN_SUSCEPTOR_ID$>
	RDSRec<RDS_REACT_IDLE_TIME$>	= RunRec<REACT_RUN_REACT_IDLE_TIME$>
	
	RDSRec<RDS_POCKET$>			= RunRec<REACT_RUN_POCKET$>
	RDSRec<RDS_POCKET_CHAR$>	= RunRec<REACT_RUN_POCKET_CHAR$>
	RDSRec<RDS_ZONE$>			= RunRec<REACT_RUN_ZONE$>
	RDSRec<RDS_IN_CASS_NO$>		= RunRec<REACT_RUN_IN_CASS_NO$>
	RDSRec<RDS_IN_SLOT_NO$>		= RunRec<REACT_RUN_IN_SLOT_NO$>
	RDSRec<RDS_OUT_CASS_NO$>	= RunRec<REACT_RUN_OUT_CASS_NO$>
	RDSRec<RDS_OUT_CASS_SLOT$>	= RunRec<REACT_RUN_OUT_SLOT_NO$>
	RDSRec<RDS_WAFER_CHAR$>		= RunRec<REACT_RUN_WAFER_CHAR$>
	
	RDSRec<RDS_OP_OUT_EX1$>			= RunRec<REACT_RUN_EX_UNLOAD$>
	
	OpOut1DTM = RunRec<REACT_RUN_EX_UNLOAD_DTM$>
	RDSRec<RDS_OP_OUT_EX1_DATE$>	= ICONV(FIELD(OpOut1DTM,' ',1),'D')
	RDSRec<RDS_OP_OUT_EX1_TIME$>	= ICONV(FIELD(OpOut1DTM,' ',2),'MTS')
	
	RDSRec<RDS_OP_IN_EX2$>			= RunRec<REACT_RUN_EX_LOAD$>
	
	OpIn2DTM = RunRec<REACT_RUN_EX_LOAD_DTM$>
	RDSRec<RDS_OP_IN_EX2_DATE$>	= ICONV(FIELD(OpIn2DTM,' ',1),'D')
	RDSRec<RDS_OP_IN_EX2_TIME$>	= ICONV(FIELD(OpIn2DTM,' ',2),'MTS')
	
	IF RunRec<REACT_RUN_EX_UNLOAD$,2> NE '' THEN
		RDSRec<RDS_OP_OUT_EX2$>	= RunRec<REACT_RUN_EX_UNLOAD$,2>
		
		OpOut2DTM = RunRec<REACT_RUN_EX_UNLOAD_DTM$,2>
		RDSRec<RDS_OP_OUT_EX2_DATE$>	= ICONV(FIELD(OpOut2DTM,' ',1),'D')
		RDSRec<RDS_OP_OUT_EX2_TIME$>	= ICONV(FIELD(OpOut2DTM,' ',2),'MTS')
		
		RDSRec<RDS_OP_IN_EX3$>		= RunRec<REACT_RUN_EX_LOAD$,2>
		
		OpIn3DTM = RunRec<REACT_RUN_EX_LOAD_DTM$,2>
		RDSRec<RDS_OP_IN_EX3_DATE$>	= ICONV(FIELD(OpIn3DTM,' ',1),'D')
		RDSRec<RDS_OP_IN_EX3_TIME$>	= ICONV(FIELD(OpIn3DTM,' ',2),'MTS')
		
	END
	
	PSRec = XLATE('PROD_SPEC',PSN,'','X')

	ReactorType = PSRec<PROD_SPEC_REACTOR_TYPE$>

	RDSRec<RDS_SPECIAL_INST$>	= PSRec<Prod_Spec_Spec_Substrate$,QSSubInstructions$>
	RDSRec<RDS_SPEC_TYPE_ORIG$>	= XLATE('PROD_SPEC',PSN,'SPEC_TYPE','X')
	*RDSRec<RDS_OVERGROW_REQ$>	= LayerSpec<PRS_LAYER_RES_MEASUREMENT$,9>	;* JCH 2/27/2006
	
	WRITE RDSRec ON RDSTable,RDSNo THEN
		Null
	END

END
		
/*		
		
		
		
	* * * * Original Program * * * * * * VVVVV

	IF WOStepKey = '' THEN GOTO Bail
	
	PSNo	= XLATE('WO_STEP',WOStepKey,1,'X')	
	WONo 	= WOStepKey[1,'*']
	StepNo	= WOStepKey[COL2()+1,'*']
	CassNo	= XLATE('RDS',RDSNo,'RUN_ORDER_NUM','X')
	PSRec	= XLATE('PROD_SPEC',PSNo,'','X')
	
	RunRec = ''

	*RunRec<REACT_RUN_WO_NO$>			= WOStepKey[1,'*']
	*RunRec<REACT_RUN_WO_STEP$>			= WOStepKey[COL2()+1,'*']
	*RunRec<REACT_RUN_CASS_NO$>			= CassNo
	*RunRec<REACT_RUN_ENTER_BY$>			= RDSRec<RDS_ENTRY_ID$>
	
	*RunRec<REACT_RUN_ENTER_DTM$>		= ICONV(OCONV(RDSRec<RDS_ENTRY_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_ENTRY_TIME$>,'MT'),'DT')
	*RunRec<REACT_RUN_REACTOR$>			= RDSRec<RDS_REACTOR$>
	*RunRec<REACT_RUN_SHIFT$>			= RDSRec<RDS_SHIFT$>
	*RunRec<REACT_RUN_LOAD_LOCK_SIDE$>	= RDSRec<RDS_LOAD_LOCK_SIDE$>
	*RunRec<REACT_RUN_LAST_WAFER_RHO$>	= RDSRec<RDS_LAST_WAFER_RHO$>
	*RunRec<REACT_RUN_SPECIAL_INST$>		= RDSRec<RDS_SPECIAL_INST$>
	*RunRec<REACT_RUN_RDS_LAYER_KEYS$>	= RDSRec<RDS_RDS_LAYER_KEYS$>
	*RunRec<REACT_RUN_VER_WFR_CNT$>		= RDSRec<RDS_VERIFY_QTY$>	
	*RunRec<REACT_RUN_LOAD_WFR_CNT$>		= RDSRec<RDS_WAFERS_IN$>
	
	*RunRec<REACT_RUN_ADE_READ$>			= RDSRec<RDS_ADE_READ$>
	*RunRec<REACT_RUN_INJECTORS$>		= RDSRec<RDS_INJECTORS$>
	*RunRec<REACT_RUN_TUBE_ID$> 			= RDSRec<RDS_TUBE_ID$>
	*RunRec<REACT_RUN_TUBE_GRADE$>		= RDSRec<RDS_TUBE_GRADE$>
	*RunRec<REACT_RUN_SUSCEPTOR_ID$>		= RDSRec<RDS_SUSCEPTOR_ID$>
	*RunRec<REACT_RUN_REACT_IDLE_TIME$>	= RDSRec<RDS_REACT_IDLE_TIME$>
	
	IF RDSRec<RDS_SUPPLEMENT$> = 1 THEN
		RunRec<REACT_RUN_SUPP_INST$> 		= RDSRec<RDS_SUPPL_INST$>
		RunRec<REACT_RUN_SUPP_ENTRY_ID$>	= RDSRec<RDS_SUPPL_ENTRY_ID$>
		RunRec<REACT_RUN_SUPP_ENTRY_DTM$>	= ICONV(OCONV(RDSRec<RDS_SUPPL_ENTRY_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_SUPPL_ENTRY_TIME$>,'MTS'),'DT')	
		RunRec<REACT_RUN_SUPP_SIG$>			= RDSRec<RDS_SUPPL_SIG$>
		RunRec<REACT_RUN_SUPP_SIG_DTM$>		= ICONV(OCONV(RDSRec<RDS_SUPPL_SIG_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_SUPPL_SIG_TIME$>,'MTS'),'DT')
	END
	
	RunRec<REACT_RUN_EX_UNLOAD$>		= RDSRec<RDS_OP_OUT_EX1$>
	RunRec<REACT_RUN_EX_UNLOAD_DTM$>	= ICONV(OCONV(RDSRec<RDS_OP_OUT_EX1_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_OP_OUT_EX1_TIME$>,'MTS'),'DT')
	RunRec<REACT_RUN_EX_UNLOAD_REASON$>	= ''
	RunRec<REACT_RUN_EX_LOAD$>			= RDSRec<RDS_OP_IN_EX2$>
	RunRec<REACT_RUN_EX_LOAD_DTM$>		= ICONV(OCONV(RDSRec<RDS_OP_IN_EX2_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_OP_IN_EX2_TIME$>,'MTS'),'DT')
	
	IF RDSRec<RDS_OP_OUT_EX2$> NE '' THEN
		RunRec<REACT_RUN_EX_UNLOAD$,2>			= RDSRec<RDS_OP_OUT_EX2$>
		RunRec<REACT_RUN_EX_UNLOAD_DTM$,2>		= ICONV(OCONV(RDSRec<RDS_OP_OUT_EX2_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_OP_OUT_EX2_TIME$>,'MTS'),'DT')
		RunRec<REACT_RUN_EX_UNLOAD_REASON$,2>	= ''
		RunRec<REACT_RUN_EX_LOAD$,2>			= RDSRec<RDS_OP_IN_EX3$>
		RunRec<REACT_RUN_EX_LOAD_DTM$,2>		= ICONV(OCONV(RDSRec<RDS_OP_IN_EX3_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_OP_IN_EX3_TIME$>,'MTS'),'DT')
	END
	
	*RunRec<REACT_RUN_POCKET$>		= RDSRec<RDS_POCKET$>
	*RunRec<REACT_RUN_POCKET_CHAR$>	= RDSRec<RDS_POCKET_CHAR$>
	*RunRec<REACT_RUN_ZONE$>			= RDSRec<RDS_ZONE$>
	*RunRec<REACT_RUN_IN_CASS_NO$>	= RDSRec<RDS_IN_CASS_NO$>
	*RunRec<REACT_RUN_IN_SLOT_NO$>	= RDSRec<RDS_IN_SLOT_NO$>
	*RunRec<REACT_RUN_OUT_CASS_NO$>	= RDSRec<RDS_OUT_CASS_NO$>
	*RunRec<REACT_RUN_OUT_SLOT_NO$>	= RDSRec<RDS_OUT_CASS_SLOT$>
	*RunRec<REACT_RUN_WAFER_CHAR$>	= RDSRec<RDS_WAFER_CHAR$>

	PSRec = XLATE('PROD_SPEC',PSNo,'','X')

	ReactorType = PSRec<PROD_SPEC_REACTOR_TYPE$>

	* PreEPI
	PreStageRec = ''
	
	PreStageRec<REACT_RUN_CI_SPEC_BRIGHTLIGHT$>				= PSRec<PROD_SPEC_PRE_BRIGHTLIGHT$>
	PreStageRec<REACT_RUN_CI_SPEC_MICROSCOPE$>				= PSRec<PROD_SPEC_PRE_MICROSCOPE$>
	PreStageRec<REACT_RUN_CI_SPEC_SURFSCAN$>				= PSRec<PROD_SPEC_PRE_SURFSCAN$>
	PreStageRec<REACT_RUN_CI_SPEC_SURFSCAN_RECIPE$>			= PSRec<PROD_SPEC_PRE_SURFSCAN_RECIPE$>
	PreStageRec<REACT_RUN_CI_SPEC_CLEAN_SUBOXIDE$>			= PSRec<PROD_SPEC_SPEC_SUBSTRATE$,QSSubOxide$>
	PreStageRec<REACT_RUN_CI_SPEC_CLEAN_OXIDE_ANGSTROMS$>	= PSRec<PROD_SPEC_SPEC_SUBSTRATE$,QSSubOxideAngstroms$>
	PreStageRec<REACT_RUN_CI_SPEC_CLEAN_TOOL$>				= PSRec<PROD_SPEC_SPEC_SUBSTRATE$,QSSubPreClean$>
	PreStageRec<REACT_RUN_CI_SPEC_CLEAN_AKRION_RECIPE$>		= PSRec<PROD_SPEC_SPEC_SUBSTRATE$,QSSubPreAkrionRecipe$>
	PreStageRec<REACT_RUN_CI_SPEC_SURF_HAZE$>				= PSRec<PROD_SPEC_PRE_SURF_HAZE$>
	PreStageRec<REACT_RUN_CI_SPEC_SURF_DEFECTS$>			= PSRec<PROD_SPEC_PRE_SURF_DEFECTS$>
	PreStageRec<REACT_RUN_CI_SPEC_PITS$>					= PSRec<PROD_SPEC_PRE_PITS$>
	PreStageRec<REACT_RUN_CI_SPEC_MOUNDS$>					= PSRec<PROD_SPEC_PRE_MOUNDS$>
	PreStageRec<REACT_RUN_CI_SPEC_BL_DEFECTS$>				= PSRec<PROD_SPEC_PRE_BL_DEFECTS$>
	PreStageRec<REACT_RUN_CI_SPEC_SPOTS$>					= PSRec<PROD_SPEC_PRE_SPOTS$>
	PreStageRec<REACT_RUN_CI_SPEC_FOV$>						= PSRec<PROD_SPEC_PRE_FOV$>
	PreStageRec<REACT_RUN_CI_SPEC_SCRATCHES$>				= PSRec<PROD_SPEC_PRE_SCRATCHES$>
	PreStageRec<REACT_RUN_CI_SPEC_SCRATCH_LEN$>				= PSRec<PROD_SPEC_PRE_SCRATCH_LEN$>
	PreStageRec<REACT_RUN_CI_SPEC_LPD$>						= PSRec<PROD_SPEC_PRE_LPD$>
	
	PreStageRec<REACT_RUN_CI_RDS_NO$>				= RDSNo
	PreStageRec<REACT_RUN_CI_CLEAN_CODE$>			= RDSRec<RDS_PRE_CODE$>
	PreStageRec<REACT_RUN_CI_CLEAN_BOAT_ID$>		= RDSRec<RDS_PRE_BOAT_ID$>
	PreStageRec<REACT_RUN_CI_CLEAN_SRD_NO$>			= RDSRec<RDS_PRE_SRD_NUM$>
	
	IF RDSRec<RDS_PRE_CODE$> NE '' OR RDSRec<RDS_PRE_BOAT_ID$> NE '' OR RDSRec<RDS_PRE_SRD_NUM$> NE '' THEN
		PreStageRec<REACT_RUN_CI_CLEAN_SIG$>			= RDSRec<RDS_PRE_EPI_SIG$>
		PreStageRec<REACT_RUN_CI_CLEAN_SIG_DTM$>		= ICONV(OCONV(RDSRec<RDS_PRE_EPI_SIG_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_PRE_EPI_SIG_TIME$>,'MTS'),'DT')
	END
	
	PreStageRec<REACT_RUN_CI_PITS$>					= RDSRec<RDS_PRE_PITS$>
	PreStageRec<REACT_RUN_CI_MOUNDS$>				= RDSRec<RDS_PRE_MOUNDS$>
	PreStageRec<REACT_RUN_CI_LPD_IN$>				= RDSRec<RDS_LPD_PRECLEAN$>
	PreStageRec<REACT_RUN_CI_LPD_OUT$>				= RDSRec<RDS_LPD_POST_PRECLEAN$>
	PreStageRec<REACT_RUN_CI_BL_DEFECTS$>			= RDSRec<RDS_PRE_BL_DEFECTS$>
	PreStageRec<REACT_RUN_CI_SPOTS$>				= RDSRec<RDS_PRE_SPOTS$>
	PreStageRec<REACT_RUN_CI_FOV$>					= RDSRec<RDS_PRE_FOV$>
	PreStageRec<REACT_RUN_CI_SCRATCHES$>			= RDSRec<RDS_PRE_SCRATCHES$>
	PreStageRec<REACT_RUN_CI_SCRATCH_LEN$>			= RDSRec<RDS_PRE_SCRATCH_LEN$>
	PreStageRec<REACT_RUN_CI_COMMENTS$>				= RDSRec<RDS_PRE_EPI_COMMENTS$>
	
	SurfaceScanRec = XLATE('SURFACE_SCAN',WOStepKey:'*':CassNo:'*':'PR','','X')
	
	PreStageRec<REACT_RUN_CI_SS_SCAN_TOOL$>			= SurfaceScanRec<SURFACE_SCAN_SCAN_TOOL$> 
	PreStageRec<REACT_RUN_CI_SS_SCAN_DTM$>			= SurfaceScanRec<SURFACE_SCAN_SCAN_DTM$> 
	PreStageRec<REACT_RUN_CI_SS_SUM_OF_DEF_MIN$>	= SurfaceScanRec<SURFACE_SCAN_SUM_OF_DEF_MIN$>
	PreStageRec<REACT_RUN_CI_SS_SUM_OF_DEF_MAX$>	= SurfaceScanRec<SURFACE_SCAN_SUM_OF_DEF_MAX$>
	PreStageRec<REACT_RUN_CI_SS_SUM_OF_DEF_AVG$>	= SurfaceScanRec<SURFACE_SCAN_SUM_OF_DEF_AVG$>
	PreStageRec<REACT_RUN_CI_SS_HAZE_AVG_MIN$>		= SurfaceScanRec<SURFACE_SCAN_HAZE_AVG_MIN$>
	PreStageRec<REACT_RUN_CI_SS_HAZE_AVG_MAX$>		= SurfaceScanRec<SURFACE_SCAN_HAZE_AVG_MAX$>
	PreStageRec<REACT_RUN_CI_SS_HAZE_AVG_AVG$>		= SurfaceScanRec<SURFACE_SCAN_HAZE_AVG_AVG$>
	
	IF PreStageRec NE '' THEN
		WRITE PreStageRec ON FileOut,WOStepKey:'*':CassNo:'*':'PRE' THEN
			RunRec<REACT_RUN_PRE_CI_KEY$> = WOStepKey:'*':CassNo:'*':'PRE'
		END
	END
														
	* First Wafer
	
	FirstStageRec = ''
	
	FirstStageRec<REACT_RUN_CI_SPEC_BRIGHTLIGHT$>			= PSRec<PROD_SPEC_FIRST_BRIGHTLIGHT$>
	FirstStageRec<REACT_RUN_CI_SPEC_MICROSCOPE$>			= PSRec<PROD_SPEC_FIRST_MICROSCOPE$>
	FirstStageRec<REACT_RUN_CI_SPEC_SURFSCAN$>				= PSRec<PROD_SPEC_FIRST_SURFSCAN$>
	FirstStageRec<REACT_RUN_CI_SPEC_SURFSCAN_RECIPE$>		= PSRec<PROD_SPEC_FIRST_SURFSCAN_RECIPE$>
	FirstStageRec<REACT_RUN_CI_SPEC_CLEAN_TOOL$>			= ''
	FirstStageRec<REACT_RUN_CI_SPEC_CLEAN_AKRION_RECIPE$>	= ''
	FirstStageRec<REACT_RUN_CI_SPEC_SURF_HAZE$>				= PSRec<PROD_SPEC_POST_SURF_HAZE$>
	FirstStageRec<REACT_RUN_CI_SPEC_SURF_DEFECTS$>			= PSRec<PROD_SPEC_POST_SURF_DEFECTS$>
	FirstStageRec<REACT_RUN_CI_SPEC_PITS$>					= PSRec<PROD_SPEC_POST_PITS$>
	FirstStageRec<REACT_RUN_CI_SPEC_MOUNDS$>				= PSRec<PROD_SPEC_POST_MOUNDS$>
	FirstStageRec<REACT_RUN_CI_SPEC_BL_DEFECTS$>			= PSRec<PROD_SPEC_POST_BL_DEFECTS$>
	FirstStageRec<REACT_RUN_CI_SPEC_SPOTS$>					= PSRec<PROD_SPEC_POST_SPOTS$>
	FirstStageRec<REACT_RUN_CI_SPEC_FOV$>					= PSRec<PROD_SPEC_POST_FOV$>
	FirstStageRec<REACT_RUN_CI_SPEC_SCRATCHES$>				= PSRec<PROD_SPEC_POST_SCRATCHES$>
	FirstStageRec<REACT_RUN_CI_SPEC_SCRATCH_LEN$>			= PSRec<PROD_SPEC_POST_SCRATCH_LEN$>
	FirstStageRec<REACT_RUN_CI_SPEC_LPD$>					= PSRec<PROD_SPEC_POST_LPD$>
	FirstStageRec<REACT_RUN_CI_SPEC_STACK_FAULTS$>			= PSRec<PROD_SPEC_POST_STACK_FAULTS$>
	FirstStageRec<REACT_RUN_CI_SPEC_SPIKES$>				= PSRec<PROD_SPEC_POST_SPIKES$>
	FirstStageRec<REACT_RUN_CI_SPEC_FWI_LWI$>				= PSRec<PROD_SPEC_POST_FWI_LWI$>
	
	FirstStageRec<REACT_RUN_CI_RDS_NO$>				= RDSNo
	FirstStageRec<REACT_RUN_CI_CLEAN_CODE$>			= ''	;*RDSRec<RDS_PRE_CODE$>
	FirstStageRec<REACT_RUN_CI_CLEAN_BOAT_ID$>		= ''	;*RDSRec<RDS_PRE_BOAT_ID$>
	FirstStageRec<REACT_RUN_CI_CLEAN_SRD_NO$>		= ''	;*RDSRec<RDS_PRE_SRD_NUM$>
	
	FirstStageRec<REACT_RUN_CI_PITS$>				= RDSRec<RDS_POST_PITS$ >
	FirstStageRec<REACT_RUN_CI_MOUNDS$>				= RDSRec<RDS_POST_MOUNDS$>
	FirstStageRec<REACT_RUN_CI_LPD_IN$>				= RDSRec<RDS_LPD_FIRSTWAFER$>
	FirstStageRec<REACT_RUN_CI_LPD_OUT$>			= ''
	FirstStageRec<REACT_RUN_CI_STACK_FAULTS$>		= RDSRec<RDS_POST_STACK_FAULTS$>
	FirstStageRec<REACT_RUN_CI_SPIKES$>				= RDSRec<RDS_POST_SPIKES$>
	FirstStageRec<REACT_RUN_CI_BL_DEFECTS$>			= RDSRec<RDS_POST_BL_DEFECTS$>
	FirstStageRec<REACT_RUN_CI_SPOTS$>				= RDSRec<RDS_POST_SPOTS$>
	FirstStageRec<REACT_RUN_CI_FOV$>				= RDSRec<RDS_POST_FOV$>
	FirstStageRec<REACT_RUN_CI_SCRATCHES$>			= RDSRec<RDS_POST_SCRATCHES$>
	FirstStageRec<REACT_RUN_CI_SCRATCH_LEN$>		= RDSRec<RDS_POST_SCRATCH_LEN$>
	FirstStageRec<REACT_RUN_CI_COMMENTS$>			= RDSRec<RDS_COMMENTS$>
	
	SurfaceScanRec = XLATE('SURFACE_SCAN',WOStepKey:'*':CassNo:'*':'FW','','X')
	
	FirstStageRec<REACT_RUN_CI_SS_SCAN_TOOL$>			= SurfaceScanRec<SURFACE_SCAN_SCAN_TOOL$> 
	FirstStageRec<REACT_RUN_CI_SS_SCAN_DTM$>			= SurfaceScanRec<SURFACE_SCAN_SCAN_DTM$> 
	FirstStageRec<REACT_RUN_CI_SS_SUM_OF_DEF_MIN$>		= SurfaceScanRec<SURFACE_SCAN_SUM_OF_DEF_MIN$>
	FirstStageRec<REACT_RUN_CI_SS_SUM_OF_DEF_MAX$>		= SurfaceScanRec<SURFACE_SCAN_SUM_OF_DEF_MAX$>
	FirstStageRec<REACT_RUN_CI_SS_SUM_OF_DEF_AVG$>		= SurfaceScanRec<SURFACE_SCAN_SUM_OF_DEF_AVG$>
	FirstStageRec<REACT_RUN_CI_SS_HAZE_AVG_MIN$>		= SurfaceScanRec<SURFACE_SCAN_HAZE_AVG_MIN$>
	FirstStageRec<REACT_RUN_CI_SS_HAZE_AVG_MAX$>		= SurfaceScanRec<SURFACE_SCAN_HAZE_AVG_MAX$>
	FirstStageRec<REACT_RUN_CI_SS_HAZE_AVG_AVG$>		= SurfaceScanRec<SURFACE_SCAN_HAZE_AVG_AVG$>
	
	IF FirstStageRec NE '' THEN
		WRITE FirstStageRec ON FileOut,WOStepKey:'*':CassNo:'*':'WFR' THEN
			RunRec<REACT_RUN_WFR_CI_KEY$> = WOStepKey:'*':CassNo:'*':'WFR'
		END
	END

	* Post Clean
			
	PostStageRec = ''
	
	PostStageRec<REACT_RUN_CI_SPEC_CLEAN_TOOL$>				= PSRec<PROD_SPEC_SPEC_SUBSTRATE$,QSSubPostClean$>
	PostStageRec<REACT_RUN_CI_SPEC_CLEAN_AKRION_RECIPE$>	= PSRec<PROD_SPEC_SPEC_SUBSTRATE$,QSSubPostAkrionRecipe$>
	
	PostStageRec<REACT_RUN_CI_SPEC_BRIGHTLIGHT$>			= PSRec<PROD_SPEC_POST_CLEAN_BRIGHTLIGHT$>
	PostStageRec<REACT_RUN_CI_SPEC_SURFSCAN$>				= PSRec<PROD_SPEC_POST_CLEAN_SURFSCAN$>
	PostStageRec<REACT_RUN_CI_SPEC_SURFSCAN_RECIPE$>		= PSRec<PROD_SPEC_POST_CLEAN_SURFSCAN_RECIPE$>
	
	PostStageRec<REACT_RUN_CI_SPEC_SURF_HAZE$>				= PSRec<PROD_SPEC_POST_CLEAN_SURF_HAZE$>
	PostStageRec<REACT_RUN_CI_SPEC_SURF_DEFECTS$>			= PSRec<PROD_SPEC_POST_CLEAN_SURF_DEFECTS$>
	PostStageRec<REACT_RUN_CI_SPEC_SS_SAMP_QTY$>			= PSRec<PROD_SPEC_POST_CLEAN_SS_SAMP_QTY$>
	
	
	PostStageRec<REACT_RUN_CI_RDS_NO$>						= RDSNo
	PostStageRec<REACT_RUN_CI_CLEAN_CODE$>					= RDSRec<RDS_POST_CODE$>
	PostStageRec<REACT_RUN_CI_CLEAN_BOAT_ID$>				= RDSRec<RDS_POST_BOAT_ID$>
	PostStageRec<REACT_RUN_CI_CLEAN_SRD_NO$>				= RDSRec<RDS_POST_SRD_NUM$>
	
	IF RDSRec<RDS_POST_CODE$> NE '' OR RDSRec<RDS_POST_BOAT_ID$> NE '' OR RDSRec<RDS_POST_SRD_NUM$> NE '' THEN
		PostStageRec<REACT_RUN_CI_CLEAN_SIG$>					= RDSRec<RDS_POST_EPI_SIG$>
		PostStageRec<REACT_RUN_CI_CLEAN_SIG_DTM$>				= ICONV(OCONV(RDSRec<RDS_POST_EPI_SIG_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_POST_EPI_SIG_TIME$>,'MTS'),'DT')
	END
		
	PostStageRec<REACT_RUN_CI_COMMENTS$>					= RDSRec<RDS_POST_EPI_COMMENTS$>
	
	SurfaceScanRec = XLATE('SURFACE_SCAN',WOStepKey:'*':CassNo:'*':'PC','','X')
	
	PostStageRec<REACT_RUN_CI_SS_SCAN_TOOL$>		= SurfaceScanRec<SURFACE_SCAN_SCAN_TOOL$> 
	PostStageRec<REACT_RUN_CI_SS_SCAN_DTM$>			= SurfaceScanRec<SURFACE_SCAN_SCAN_DTM$> 
	PostStageRec<REACT_RUN_CI_SS_SUM_OF_DEF_MIN$>	= SurfaceScanRec<SURFACE_SCAN_SUM_OF_DEF_MIN$>
	PostStageRec<REACT_RUN_CI_SS_SUM_OF_DEF_MAX$>	= SurfaceScanRec<SURFACE_SCAN_SUM_OF_DEF_MAX$>
	PostStageRec<REACT_RUN_CI_SS_SUM_OF_DEF_AVG$>	= SurfaceScanRec<SURFACE_SCAN_SUM_OF_DEF_AVG$>
	PostStageRec<REACT_RUN_CI_SS_HAZE_AVG_MIN$>		= SurfaceScanRec<SURFACE_SCAN_HAZE_AVG_MIN$>
	PostStageRec<REACT_RUN_CI_SS_HAZE_AVG_MAX$>		= SurfaceScanRec<SURFACE_SCAN_HAZE_AVG_MAX$>
	PostStageRec<REACT_RUN_CI_SS_HAZE_AVG_AVG$>		= SurfaceScanRec<SURFACE_SCAN_HAZE_AVG_AVG$>
	
	IF PostStageRec NE '' THEN
		WRITE PostStageRec ON FileOut,WOStepKey:'*':CassNo:'*':'POST' THEN
			RunRec<REACT_RUN_POST_CI_KEY$> = WOStepKey:'*':CassNo:'*':'POST'
		END
	END
	
	RunRec<REACT_RUN_VER_SIG$>			= RDSRec<RDS_PRE_EPI_SIG$>
	RunRec<REACT_RUN_VER_SIG_DTM$>		= ICONV(OCONV(RDSRec<RDS_PRE_EPI_SIG_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_PRE_EPI_SIG_TIME$>,'MTS'),'DT')
	
	RunRec<REACT_RUN_PRE_SIG$>			= RDSRec<RDS_PRE_EPI_SIG$>
	RunRec<REACT_RUN_PRE_SIG_DTM$>		= ICONV(OCONV(RDSRec<RDS_PRE_EPI_SIG_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_PRE_EPI_SIG_TIME$>,'MTS'),'DT')
	
	RunRec<REACT_RUN_LOAD_SIG$>			= RDSRec<RDS_OPERATOR_IN$>
	RunRec<REACT_RUN_LOAD_SIG_DTM$>		= ICONV(OCONV(RDSRec<RDS_DATE_IN$>,'D4/'):' ':OCONV(RDSRec<RDS_TIME_IN$>,'MTS'),'DT')
	
	RunRec<REACT_RUN_WFR_SIG$>			= RDSRec<RDS_FIRST_WAF_SIG$>
	RunRec<REACT_RUN_WFR_SIG_DTM$>		= ICONV(OCONV(RDSRec<RDS_FIRST_WAF_SIG_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_FIRST_WAF_SIG_TIME$>,'MTS'),'DT')
	
	RunRec<REACT_RUN_UNLOAD_SIG$>		= RDSRec<RDS_OPERATOR_OUT$>
	RunRec<REACT_RUN_UNLOAD_SIG_DTM$>	= ICONV(OCONV(RDSRec<RDS_DATE_OUT$>,'D4/'):' ':OCONV(RDSRec<RDS_TIME_OUT$>,'MTS'),'DT')
	
	RunRec<REACT_RUN_POST_SIG$>			= RDSRec<RDS_POST_EPI_SIG$>
	RunRec<REACT_RUN_POST_SIG_DTM$>		= ICONV(OCONV(RDSRec<RDS_POST_EPI_SIG_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_POST_EPI_SIG_TIME$>,'MTS'),'DT')
	
	RunRec<REACT_RUN_FINAL_SIG$>		= RDSRec<RDS_SUP_VER_SIG$>
	RunRec<REACT_RUN_FINAL_SIG_DTM$>	= ICONV(OCONV(RDSRec<RDS_SUP_VER_SIG_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_SUP_VER_SIG_TIME$>,'MTS'),'DT')
	
	WRITE RunRec ON RRTable,RDSNo ELSE NULL
	
	READ WOMatRec FROM WOMatTable,WONo:'*':CassNo THEN
		LOCATE RDSNo IN WOMatRec<WO_MAT_RDS_NO$> USING @VM SETTING Pos THEN
			WOMatRec<WO_MAT_RDS_FINAL_SIG$,Pos> = RunRec<REACT_RUN_FINAL_SIG$>
			WOMatRec<WO_MAT_RDS_FINAL_SIG_DTM$,Pos> = RunRec<REACT_RUN_FINAL_SIG_DTM$>
		END
		WRITE WOMatRec ON WOMatTable,WONo:'*':CassNo ELSE
			NULL
		END
	END
	
END	;* End of RDSRec READ
*/

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

RETURN




