COMPILE ROUTINE FIX_OFI(Dummy)
ROWDEF(CHARSTR)

DECLARE SUBROUTINE obj_Schedule,Send_Dyn,Send_Info, obj_Shipment
DECLARE FUNCTION Get_Status, Set_Printer

$INSERT ICAR_EQUATES


DEBUG

OPEN 'ICAR' TO FileIn ELSE
	GOTO Bail
END



CutoffDt = ICONV('3/11/2007','D')

SELECT FileIn
debug
Done = 0
RecCount = 0
FixCount = 0

LOOP
	READNEXT RefNo ELSE Done = 1
UNTIL Done
	READ OFIRec FROM FileIn,RefNo THEN
		RecCount += 1
		IF OFIRec<ICAR_ENTRY_DATE$> GE CutoffDt THEN
			IF OFIRec<ICAR_CONFIRM_STATUS$ > = 'C' THEN
				FixCount += 1
				IF OFIRec<ICAR_PROBLEM_TYPE$> = 'A' THEN
					OFIRec<ICAR_AWARD_AMT$> = '25'
				END ELSE
					OFIRec<ICAR_AWARD_AMT$> = ''
				END
				
				*WRITE OFIRec ON FileIn,RefNo THEN
					Send_Dyn(RecCount:' - ':FixCount:' - ':OCONV(OFIRec<ICAR_ENTRY_DATE$>,'D4/'))
				*END
				
			END
		END
	END
REPEAT





IF Get_Status(errCode) THEN DEBUG


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

RETURN
