COMPILE ROUTINE FIX_WO_REACT(dummy)
ROWDEF(CHARSTR)

DECLARE SUBROUTINE Send_Info, Send_Dyn, RList


EQU TARGET_ACTIVELIST$ TO 5

$INSERT WO_REACT_EQUATES
$INSERT REACT_RUN_EQUATES

OPEN 'WO_REACT' TO WOReactTable ELSE
	DEBUG
	GOTO Bail
END

DEBUG

READ Record from WOReactTable,"161055*1*30" THEN


RDSNo = 911403

FOR I = 1 TO 8
	Record = INSERT(Record,1,I,0,RDSNo)
	Record = INSERT(Record,2,I,0,I)
	RDSNo += 1

NEXT I



RDSNo = 911943

FOR I = 9 TO 14
	Record = INSERT(Record,1,I,0,RDSNo)
	Record = INSERT(Record,2,I,0,I)
	RDSNo += 1

NEXT I


WRITE Record ON WOReactTable,"161055*1*30" THEN NULL


GOTO Bail

*SELECT WOReactTable 


RList('SELECT WO_REACT BY WO_NO ',TARGET_ACTIVELIST$)		;* Change to desired WO_NO


Done = 0
RecCnt = 0


LOOP
	READNEXT WOReactKey ELSE Done = 1
UNTIL Done
	READ WOReactRec FROM WOReactTable,WOReactKey THEN
	
		WONo = WOReactKey[1,'*']
	
		RDSNos = WOReactRec<WO_REACT_RDS_NO$>
		
		rCnt = COUNT(RDSNos,@VM) + (RDSNos NE '')
		
		FOR I = 1 TO rCnt
			WOReactRec<WO_REACT_CASS_NO$,I> = XLATE('REACT_RUN',RDSNos<1,I>,REACT_RUN_CASS_NO$,'X')	
		NEXT I
		
		RecCnt += 1
		
		
		
		*WRITE WOReactRec ON WOReactTable,WOReactKey THEN
			Send_Dyn(RecCnt:' ':WOReactKey)
		*END
		
	END ;* End of WOReactRec read
	
REPEAT




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

END
