Printing totals prob,
You coded:
PERFORM 300-PROCESS-PAST-ACCOUNTS
UNTIL MORE-RECORDS = "N".
The only way the loop will be broken is when MORE-RECORDS = "N". This will happen only when 700-READ-DELINQUENT-FILES is executed. But, the IF statement, as coded, will never execute 700-READ-DELINQUENT-FILES, as soon as the highlighted condition becomes true.
300-PROCESS-PAST-ACCOUNTS.
IF DR-AMOUNT-DUE >= 25000
OR DR-DAYS-OVERDUE > 25
PERFORM 410-SET-DISCOUNT-RATE
ELSE
PERFORM 700-READ-DELINQUENT-FILES
END-IF.
I think what you are trying to do is read DEL-FILE, and, depending on the values, set discount rates, until EOF on DEL-FILE. If so, you could recode 300-PROCESS-PAST-ACCOUNTS this way:
300-PROCESS-PAST-ACCOUNTS.
PERFORM 700-READ-DELINQUENT-FILES
IF MORE-RECORDS = "Y"
IF (DR-AMOUNT-DUE >= 25000)
OR (DR-DAYS-OVERDUE > 25)
PERFORM 410-SET-DISCOUNT-RATE
END-IF
END-IF
.
Dimandja