COMPILE ROUTINE Fix_RECIPE(Dummy)
ROWDEF (CHARSTR)

DECLARE SUBROUTINE SEND_INFO, SEND_DYN, RList, Set_Status, Get_Status


$INSERT RECIPE_EQUATES


OPEN 'RECIPE' TO FileIn ELSE
	DEBUG
	GOTO Bail
END

DEBUG

SELECT FileIn



RecCnt = 1
Done = 0
LOOP
	READNEXT RecNo ELSE Done = 1
UNTIL Done
	
	READ RecipeRec FROM FileIn,RecNo THEN
		ReactType = TRIM(RecipeRec<RECIPE_REACTOR_TYPE$>)
		IF ReactType NE '' THEN
			
			CONVERT @LOWER_CASE TO @UPPER_CASE IN ReactType
			
			BEGIN CASE
				CASE ReactType = 'E2'			; ReactType = 'ASM'
				CASE ReactTYpe = 'E2 / ASM+'	; ReactType = 'ASM+'
				CASE ReactType = 'EPIPRO'		; ReactType = 'EPP'
				CASE ReactType = 'GEMINI'		; ReactType = 'HTR'
				
				CASE 1
						Send_Dyn(QUOTE(ReactType))
						ReactType = ''
						
			END CASE
			
			
			IF ReactType NE '' THEN
				RecipeRec<RECIPE_REACTOR_TYPE$> = ReactType
				
				WRITE RecipeRec ON FileIn,RecNo THEN
				
					Send_Dyn('Converted ':RecipeRec<RECIPE_REACTOR_TYPE$>)
				END
			END
			
		END	;* End of check for null ReactTYpe
	END	;* End of Read
REPEAT

DEBUG


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

END


