COMPILE SUBROUTINE RDS_REACT_RUN(RDSNo)

DECLARE SUBROUTINE obj_Schedule,Send_Dyn,Send_Info, Send_Dyn, obj_WO_Step, Set_Status
Declare subroutine Mona_Services
DECLARE FUNCTION Get_Status, Set_Printer, obj_RDS, obj_Prod_Spec, NextKey, MemberOf
Declare function Environment_Services, GetTickCount


$INSERT RDS_EQU
$INSERT PROD_SPEC_EQUATES
$INSERT PRS_STAGE_EQUATES
$INSERT REACT_RUN_EQUATES
$INSERT SURFACE_SCAN_EQUATES
$INSERT CLEAN_INSP_EQUATES
$INSERT QUOTE_SPEC_EQU
$INSERT WO_MAT_EQUATES
$Insert LOGICAL

IsProd = Environment_Services('IsProd')
If IsProd EQ True$ then
	MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_RDSREACTRUN'
end else
	MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_DEV_RDSREACTRUN'
end

StartTick = GetTickCount()
MetricName = 'RDSReactRun'

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

OPEN 'CLEAN_INSP' TO CITable ELSE
	GOTO Bail
END

READ RDSRec FROM RDSTable,RDSNo THEN
	
	WOStepKey = RDSRec<RDS_WO_STEP_KEY$>
	
	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')
	
	READ RunRec FROM RRTable,RDSNo ELSE RunRec = ''				;* Added 8/14/2009 JCH

	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$>,'MTS'),'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_SCHED_WFR_QTY$>	= RDSRec<RDS_CASS_WAFER_QTY$>
	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$>
	
	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$>
	
	
	RunRec<REACT_RUN_VER_COMMENT$>		= RDSRec<RDS_PRE_EPI_COMMENTS$>
	RunRec<REACT_RUN_LOAD_COMMENT$>		= RDSRec<RDS_COMMENTS$>
	RunRec<REACT_RUN_UNLOAD_COMMENT$>	= ''								;* Not in current RDS's
	RunRec<REACT_RUN_FINAL_COMMENT$>	= RDSRec<RDS_POST_EPI_COMMENTS$>
	
	
	* Signatures
	
	PreEpiSigs = RDSRec<RDS_PRE_EPI_SIG$>
		
	IF INDEX(PreEpiSigs,@VM, 1) THEN

		SigCnt = COUNT(PreEpiSigs,@VM) + (PreEpiSigs NE '')
		
		PreSig = ''
		PreSigDTM = ''
		VerSig = ''
		VerSigDTM = ''
		
		FOR I = 1 TO SigCnt
			IF I = 1 THEN 
				VerSig = RDSRec<RDS_PRE_EPI_SIG$,I>
				VerSigDTM = ICONV(OCONV(RDSRec<RDS_PRE_EPI_SIG_DATE$,I>,'D4/'):' ':OCONV(RDSRec<RDS_PRE_EPI_SIG_TIME$,I>,'MTS'),'DT')
			END ELSE
				PreSig = RDSRec<RDS_PRE_EPI_SIG$,I>
				PreSigDTM = ICONV(OCONV(RDSRec<RDS_PRE_EPI_SIG_DATE$,I>,'D4/'):' ':OCONV(RDSRec<RDS_PRE_EPI_SIG_TIME$,I>,'MTS'),'DT')
			END
		NEXT I
		IF PreSig = ''		THEN PreSig = VerSig
		IF PreSigDTM = ''	THEN PreSigDTM = VerSigDTM
		
	END ELSE
		VerSig = RDSRec<RDS_PRE_EPI_SIG$>
		VerSigDTM = ICONV(OCONV(RDSRec<RDS_PRE_EPI_SIG_DATE$>,'D4/'):' ':OCONV(RDSRec<RDS_PRE_EPI_SIG_TIME$>,'MTS'),'DT')
		PreSig = VerSig
		PreSigDTM = VerSigDTM
	END

	RunRec<REACT_RUN_VER_SIG$>			= VerSig
	RunRec<REACT_RUN_VER_SIG_DTM$>		= VerSigDTM
	
	RunRec<REACT_RUN_PRE_SIG$>			= PreSig
	RunRec<REACT_RUN_PRE_SIG_DTM$>		= PreSigDTM
	
	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')
	
		
	PSRec = XLATE('PROD_SPEC',PSNo,'','X')

	ReactorType = PSRec<PROD_SPEC_REACTOR_TYPE$>
	
	StageKeys = PSRec<PROD_SPEC_PRS_STAGE_KEY$>
	
	StageCnt = COUNT(StageKeys,@VM) + (StageKeys NE '')
	
	CIStages = 'PRE':@VM:'FWI':@VM:'LWI':@VM:'POST'
	
	FOR I = 1 TO StageCnt
		StageKey = StageKeys<1,I>
		Stage = StageKey[-1,'B*']
		
		LOCATE Stage IN CIStages USING @VM SETTING DUMMY THEN
		
			StageRec = XLATE('PRS_STAGE',StageKey,'','X')
			
			LOCATE Stage IN RunRec<REACT_RUN_CI_STAGE$> USING @VM SETTING Pos THEN
				CINo = RunRec<REACT_RUN_CI_NO$,Pos>
			END ELSE
				IF ReactorType = 'EPP'  THEN
					IF Stage = 'LWI' THEN
						CINo = NextKey('CLEAN_INSP')			;* This is a new CLEAN_INSP record
						RunRec = INSERT(RunRec,REACT_RUN_CI_NO$,Pos,0,CINo)
						RunRec = INSERT(RunRec,REACT_RUN_CI_STAGE$,Pos,0,Stage)
				
						CIRec = ''
						
						CIRec<CLEAN_INSP_WO_NO$>					= WONo
						CIRec<CLEAN_INSP_WO_STEP$>					= StepNo
						CIRec<CLEAN_INSP_CASS_NO$>					= ''		;* Null Cass No for EpiPro RDS runs
						CIRec<CLEAN_INSP_STAGE$>					= Stage
						CIRec<CLEAN_INSP_RDS_NO$>					= RDSNo
						
						CIRec<CLEAN_INSP_SPEC_INSP_REQ$>          = StageRec<PRS_STAGE_INSP_SIG_REQ$>
						CIRec<CLEAN_INSP_SPEC_BRIGHTLIGHT$>       = StageRec<PRS_STAGE_BRIGHTLIGHT$>
						CIRec<CLEAN_INSP_SPEC_MICROSCOPE$>        = StageRec<PRS_STAGE_MICROSCOPE$>
						CIRec<CLEAN_INSP_SPEC_SURFSCAN_REQ$>      = StageRec<PRS_STAGE_SURFSCAN_SIG_REQ$>
						CIRec<CLEAN_INSP_SPEC_SURFSCAN_RECIPE$>   = StageRec<PRS_STAGE_SURFSCAN_RECIPE$>
						CIRec<CLEAN_INSP_SPEC_CLEAN_REQ$>         = StageRec<PRS_STAGE_CLEAN_SIG_REQ$>
						CIRec<CLEAN_INSP_SPEC_CLEAN_TOOL$>        = StageRec<PRS_STAGE_CLEAN_TOOL$>
						CIRec<CLEAN_INSP_SPEC_CLEAN_RECIPE$>      = StageRec<PRS_STAGE_CLEAN_RECIPE$>
						CIRec<CLEAN_INSP_SPEC_SURF_HAZE$>         = StageRec<PRS_STAGE_SURF_HAZE$> 
						CIRec<CLEAN_INSP_SPEC_SURF_DEFECTS$>      = StageRec<PRS_STAGE_SURF_DEFECTS$> 
						CIRec<CLEAN_INSP_SPEC_PITS$>              = StageRec<PRS_STAGE_PITS$>
						CIRec<CLEAN_INSP_SPEC_MOUNDS$>            = StageRec<PRS_STAGE_MOUNDS$>  
						CIRec<CLEAN_INSP_SPEC_BL_DEFECTS$>        = StageRec<PRS_STAGE_BL_DEFECTS$>
						CIRec<CLEAN_INSP_SPEC_SPOTS$>             = StageRec<PRS_STAGE_SPOTS$>
						CIRec<CLEAN_INSP_SPEC_FOV$>               = StageRec<PRS_STAGE_FOV$>
						CIRec<CLEAN_INSP_SPEC_SCRATCHES$>         = StageRec<PRS_STAGE_SCRATCHES$>
						CIRec<CLEAN_INSP_SPEC_SCRATCH_LEN$>       = StageRec<PRS_STAGE_SCRATCH_LEN$>
						CIRec<CLEAN_INSP_SPEC_LPD$>               = StageRec<PRS_STAGE_LPD$>
						CIRec<CLEAN_INSP_SPEC_STACK_FAULTS$>      = StageRec<PRS_STAGE_STACK_FAULTS$>
						CIRec<CLEAN_INSP_SPEC_SPIKES$>            = StageRec<PRS_STAGE_SPIKES$>
						CIRec<CLEAN_INSP_SPEC_SS_SAMP_QTY$>       = StageRec<PRS_STAGE_SS_SAMP_QTY$>
						CIRec<CLEAN_INSP_SPEC_CLEAN_REQ$>         = StageRec<PRS_STAGE_CLEAN_SIG_REQ$
						CIRec<CLEAN_INSP_SPEC_INSP_REQ$>          = StageRec<PRS_STAGE_INSP_SIG_REQ$ 
						CIRec<CLEAN_INSP_SPEC_BSIDE_SCRATCHES$>   = StageRec<PRS_STAGE_BSIDE_SCRATCHES$>	;* Visual Inspection
						CIRec<CLEAN_INSP_SPEC_BSIDE_SCRATCH_LEN$> = StageRec<PRS_STAGE_BSIDE_SCRATCH_LEN$>	;* Visual Inspection
						CIRec<CLEAN_INSP_SPEC_BSIDE_NODULES$>     = StageRec<PRS_STAGE_BSIDE_NODULES$>		;* Visual Inspection
						CIRec<CLEAN_INSP_SPEC_BSIDE_SPIKES$>      = StageRec<PRS_STAGE_BSIDE_SPIKES$>		;* Visual Inspection
						CIRec<CLEAN_INSP_SPEC_EDGE$>              = StageRec<PRS_STAGE_EDGE$>               ;* Visual Inspection
			            
						WRITE CIRec ON CITable,CINo ELSE NULL
		
					END	;	* End of check for LWI stage
				
				END ELSE
				
					CINo = NextKey('CLEAN_INSP')			;* This is a new CLEAN_INSP record
					RunRec = INSERT(RunRec,REACT_RUN_CI_NO$,Pos,0,CINo)
					RunRec = INSERT(RunRec,REACT_RUN_CI_STAGE$,Pos,0,Stage)
			
					CIRec = ''
					
					CIRec<CLEAN_INSP_WO_NO$>					= WONo
					CIRec<CLEAN_INSP_WO_STEP$>					= StepNo
					CIRec<CLEAN_INSP_CASS_NO$>					= CassNo
					CIRec<CLEAN_INSP_STAGE$>					= Stage
					CIRec<CLEAN_INSP_RDS_NO$>					= RDSNo
					
					// Use PRS_STAGE<INSP_INTERVAL> to set CLEAN_INSP<SPEC_INSP_REQ>
                    WOQty        = Xlate('WO_LOG', WONo, 'QTY', 'X')
                    RunNo        = Xlate('RDS', RDSNo, 'RUN_ORDER_NUM', 'X')<0, 1>
                    InspInterval = Xlate('PRS_STAGE', StageKey, 'INSP_INTERVAL', 'X')
                    LastRun      = ( (RunNo * 25) EQ WOQty )
                    InspReq      = ( (Mod((RunNo - 1), InspInterval) EQ 0) or LastRun )
                    CIRec<CLEAN_INSP_SPEC_INSP_REQ$>			= InspReq
					
					CIRec<CLEAN_INSP_INSP_INTERVAL$>            = InspInterval
*					CIRec<CLEAN_INSP_SPEC_INSP_REQ$>			= StageRec<PRS_STAGE_INSP_SIG_REQ$>
					CIRec<CLEAN_INSP_SPEC_BRIGHTLIGHT$>       = StageRec<PRS_STAGE_BRIGHTLIGHT$>
					CIRec<CLEAN_INSP_SPEC_MICROSCOPE$>        = StageRec<PRS_STAGE_MICROSCOPE$>
					CIRec<CLEAN_INSP_SPEC_SURFSCAN_REQ$>      = StageRec<PRS_STAGE_SURFSCAN_SIG_REQ$>
					CIRec<CLEAN_INSP_SPEC_SURFSCAN_RECIPE$>   = StageRec<PRS_STAGE_SURFSCAN_RECIPE$>
					CIRec<CLEAN_INSP_SPEC_CLEAN_REQ$>         = StageRec<PRS_STAGE_CLEAN_SIG_REQ$>
					CIRec<CLEAN_INSP_SPEC_CLEAN_TOOL$>        = StageRec<PRS_STAGE_CLEAN_TOOL$>
					CIRec<CLEAN_INSP_SPEC_CLEAN_RECIPE$>      = StageRec<PRS_STAGE_CLEAN_RECIPE$>
					CIRec<CLEAN_INSP_SPEC_SURF_HAZE$>         = StageRec<PRS_STAGE_SURF_HAZE$> 
					CIRec<CLEAN_INSP_SPEC_SURF_DEFECTS$>      = StageRec<PRS_STAGE_SURF_DEFECTS$> 
					CIRec<CLEAN_INSP_SPEC_PITS$>              = StageRec<PRS_STAGE_PITS$>
					CIRec<CLEAN_INSP_SPEC_MOUNDS$>            = StageRec<PRS_STAGE_MOUNDS$>  
					CIRec<CLEAN_INSP_SPEC_BL_DEFECTS$>        = StageRec<PRS_STAGE_BL_DEFECTS$>
					CIRec<CLEAN_INSP_SPEC_SPOTS$>             = StageRec<PRS_STAGE_SPOTS$>
					CIRec<CLEAN_INSP_SPEC_FOV$>               = StageRec<PRS_STAGE_FOV$>
					CIRec<CLEAN_INSP_SPEC_SCRATCHES$>         = StageRec<PRS_STAGE_SCRATCHES$>
					CIRec<CLEAN_INSP_SPEC_SCRATCH_LEN$>       = StageRec<PRS_STAGE_SCRATCH_LEN$>
					CIRec<CLEAN_INSP_SPEC_LPD$>               = StageRec<PRS_STAGE_LPD$>
					CIRec<CLEAN_INSP_SPEC_STACK_FAULTS$>      = StageRec<PRS_STAGE_STACK_FAULTS$>
					CIRec<CLEAN_INSP_SPEC_SPIKES$>            = StageRec<PRS_STAGE_SPIKES$>
					CIRec<CLEAN_INSP_SPEC_SS_SAMP_QTY$>       = StageRec<PRS_STAGE_SS_SAMP_QTY$>
					CIRec<CLEAN_INSP_SPEC_CLEAN_REQ$>         = StageRec<PRS_STAGE_CLEAN_SIG_REQ$
					CIRec<CLEAN_INSP_SPEC_INSP_REQ$>          = StageRec<PRS_STAGE_INSP_SIG_REQ$
					CIRec<CLEAN_INSP_SPEC_BSIDE_SCRATCHES$>   = StageRec<PRS_STAGE_BSIDE_SCRATCHES$>	;* Visual Inspection
					CIRec<CLEAN_INSP_SPEC_BSIDE_SCRATCH_LEN$> = StageRec<PRS_STAGE_BSIDE_SCRATCH_LEN$>	;* Visual Inspection
					CIRec<CLEAN_INSP_SPEC_BSIDE_NODULES$>     = StageRec<PRS_STAGE_BSIDE_NODULES$>		;* Visual Inspection
					CIRec<CLEAN_INSP_SPEC_BSIDE_SPIKES$>      = StageRec<PRS_STAGE_BSIDE_SPIKES$>		;* Visual Inspection
			        CIRec<CLEAN_INSP_SPEC_EDGE$>              = StageRec<PRS_STAGE_EDGE$>               ;* Visual Inspection
					
					WRITE CIRec ON CITable,CINo ELSE NULL
					
				END ;* End of check for EpiPro reactor type
				
			END	;* End of Stage Locate RunRec<REACT_RUN_CI_STAGE$>
			
		END	;* End of check for valid CIStage
		
	NEXT I
		
	
	WRITE RunRec ON RRTable,RDSNo ELSE NULL
	
	/*
	* Dead on 5/19/2010 JCH - causing problems 
	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
	*/
	
	EndTick = GetTickCount()
    Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
	
END	;* End of RDSRec READ
	
* * * * * * *
Bail:
* * * * * * *

RETURN


* * * * * * *
CleanInsp:
* * * * * * *




RETURN










