Hi, I have declare a DEPOSIT-CURSOR in my program where i will read account number from file and get the sum of deposit balance by fetching and summing up deposit balance from cursor. The problem i am facing is the cursor is retrieving data correctly for the first account from the file. starting from second account number it is returning same rows as of the first account. appreciate help and ideas.
As per my understanding you are reading account-no from file and then getting the related data thru cursor. Since u are using cursor, the account-no host variable should be populated with new values from file before opening the cursor again. You should also close the cursor once u retrieve data for one acct-no. Then again open the cursor for next acct-no. If u don't close the cursor then it will retrieve the same data as previous due to the cursor pointing to the previous record.