COMPILE ROUTINE MOVE_DICT_RR_CI(Dummy)
ROWDEF(CHARSTR)

DECLARE SUBROUTINE obj_Schedule,Send_Dyn,Send_Info, Send_Dyn, obj_WO_Step, Set_Status, Btree.Extract, obj_RDS, RList, ErrMsg
DECLARE FUNCTION Get_Status, Set_Printer, obj_RDS, ErrMsg


$INSERT DICT_EQUATES

EQU TARGET_ACTIVELIST$ TO 5

OPEN 'DICT.REACT_RUN_CI' TO FileIn ELSE
	debug
	GOTO Bail
END

OPEN 'DICT.CLEAN_INSP' TO FileOut ELSE
	DEBUG
	GOTO Bail
END

Map = ''
Map<1,1> = 1	; Map<2,1> = 6
Map<1,2> = 2	; Map<2,2> = 7
Map<1,3> = 3	; Map<2,3> = 8
Map<1,4> = 4	; Map<2,4> = 9
Map<1,5> = 5	; Map<2,5> = 10
Map<1,6> = 6	; Map<2,6> = 11
Map<1,7> = 7	; Map<2,7> = 12
Map<1,8> = 8	; Map<2,8> = 13
Map<1,9> = 9	; Map<2,9> = 14
Map<1,10> = 10	; Map<2,10> = 15
Map<1,11> = 11	; Map<2,11> = 16
Map<1,12> = 12	; Map<2,12> = 17
Map<1,13> = 13	; Map<2,13> = 18
Map<1,14> = 14	; Map<2,14> = 19
Map<1,15> = 15	; Map<2,15> = 20
Map<1,16> = 16	; Map<2,16> = 21
Map<1,17> = 17	; Map<2,17> = 22
Map<1,18> = 18	; Map<2,18> = 23
Map<1,19> = 20	; Map<2,19> = 24
Map<1,20> = 21	; Map<2,20> = 25
Map<1,21> = 22	; Map<2,21> = 26
Map<1,22> = 23	; Map<2,22> = 27


SELECT FileIn

RecCnt = 0
FixCnt = 0
Done = 0

debug
LOOP
	READNEXT DictID ELSE Done = 1
UNTIL Done
	RecCnt += 1
	*Send_Dyn(DictID)
	
	IF DictID[1,1] NE '%' THEN
		READ DictRec FROM FileIn,DictID THEN
			FieldNo = DictRec<DICT_COLUMN_NO$>
			IF FieldNo NE '' THEN
				IF FieldNo <= 23 THEN
					LOCATE FieldNo IN Map<1> USING @VM SETTING Pos THEN
						NewFieldNo = Map<2,Pos>
						DictRec<DICT_COLUMN_NO$> = NewFieldNo
						WRITE DictRec ON FileOut,DictID THEN
							Send_Dyn(DictID:' ':FieldNo:' -> ':NewFieldNo)
						END
					END
					
					
				END
				
				IF FieldNo >= 28 THEN
				
					WRITE DictRec ON FileOut,DictID THEN
						Send_Dyn(DictID:' ':FieldNo:' ':FieldNo)
					END
				END
				
			END	;* End of check for Field No
		END	;* End of read
	END	;* End of check for hidden record	
	
	
	*Send_Info(RecCnt:' - ':FixCnt)
REPEAT



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

END
