kasundha
Member
Hi,
I have a openedge code and it gets more than 10 hours to run.
first table has 40K + records and other tables have about 5 records per each record of first table. can you give me any suggestion to improve the efficiency of this code.
--------------------
I have a openedge code and it gets more than 10 hours to run.
first table has 40K + records and other tables have about 5 records per each record of first table. can you give me any suggestion to improve the efficiency of this code.
--------------------
Code:
FOR EACH corpdata.ArrearsRpt FIELDS() WHERE NOT CAN-DO("CC,SE,SM",SUBSTR(corpdata.ArrearsRpt.facno,5,2))
AND corpdata.ArrearsRpt.sysDte = this-monthend
AND ArrearsRpt.recSts <> "R"
AND ArrearsRpt.noRntArr >= 2
AND corpdata.ArrearsRpt.recOffc = t-officer.t-ofcCode
AND NOT can-do("IN251870,IL063128,IA065464,IL070155",corpdata.ArrearsRpt.recOffc)
AND NOT CAN-FIND(FIRST corpdata.AFI_FORM_UPDATER WHERE corpdata.AFI_FORM_UPDATER.FACILITY_NO = corpdata.ArrearsRpt.facno
AND (int(substr(corpdata.AFI_FORM_UPDATER.ACTION_DATE,1,4)) = YEAR(mSYSDATE)
AND int(SUBSTR(corpdata.AFI_FORM_UPDATER.ACTION_DATE,6,2)) = MONTH(mSYSDATE)
AND (int(SUBSTR(corpdata.AFI_FORM_UPDATER.ACTION_DATE,9,2)) > 1 AND int(SUBSTR(corpdata.AFI_FORM_UPDATER.ACTION_DATE,9,2)) < DAY(mSYSDATE) - 0))) NO-LOCK:
ASSIGN this-not-visitted = this-not-visitted + 1.
FIND FIRST DUE_RCPT WHERE DUE_RCPT.FACNO = corpdata.ArrearsRpt.facno
AND SUBSTRING (DUE_RCPT.rcptno,5,1) <> "C"
AND SUBSTRING (DUE_RCPT.rcptno,5,1) <> "W"
AND due_rcpts.amtstld <> ?
AND (DUE_RCPT.STLDATE <= mSYSDATE)
AND DUE_RCPT.STLDATE >= this-monthend
AND NOT(CAN-FIND(FIRST gl.receipts WHERE gl.receipts.rcptno = DUE_RCPT.rcptno AND gl.receipts.descr = "Sale of Vahicle Arrears Transfer to Reposess A/C" )) NO-LOCK NO-ERROR.
IF AVAILABLE DUE_RCPT THEN
DO:
ASSIGN this-not-visitted-paid = this-not-visitted-paid + 1.
END.
STATUS INPUT "PROCESS NOT VISITED - " + string(t-id) + " - " + string(this-not-visitted ).
END.
Last edited by a moderator: