COMPILE ROUTINE LOAD_REACT_MODE(Dummy)
ROWDEF (CHARSTR)

DECLARE SUBROUTINE SEND_INFO, SEND_DYN, Utility, msg

$INSERT REACT_MODE_EQU
$INSERT REACT_MODE_EQUATES

OPEN 'REACT_MODE' TO TableOut ELSE GOTO Bail

ModeData = XLATE('SYSREPOSPOPUPS','LSL2**REACTOR_MODE',8,'X')




FOR Reactor = 20 TO 69

	Rec = XLATE( 'CONFIG', 'REACT_MODE':Reactor, '', 'X' )
	
	UserName = Rec<Username$>
	StartDt = Rec<Date$>
	StartTm = Rec<Time$>
	Mode	= Rec<Mode$>
	RUId	= Rec<ReactUtilID$>
	RLId	= Rec<ReactorLogID$>
	Note	= Rec<Note$>
	
	
	Pointer = 1
	LOOP
		ModeCode = ModeData<1,Pointer,1>
		
	UNTIL ModeData<1,Pointer,2> = Mode OR Pointer > 25
	Pointer += 1
	REPEAT
	Mode = ModeCode
	
	
	StartDTM = StartDt:' ':StartTm
	StartDTM = ICONV(StartDTM,'DT')
	
	ModeKey = Reactor:'*':StartDTM
	ModeRec = ''
	ModeRec<REACT_MODE_START_USER$>		= UserName
	ModeRec<REACT_MODE_START_NOTE$>		= Note
	ModeRec<REACT_MODE_START_RU_ID$>	= RUId
	ModeRec<REACT_MODE_START_RL_ID$> 	= RLId
	ModeRec<REACT_MODE_MODE$>			= Mode
	
	*debug
	
	WRITE ModeRec ON TableOut,ModeKey THEN
		Send_Dyn(ModeKey)
	END
NEXT REACTOR


*UNLOCK All

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

END
