You need to set NOT_FOUND to 'N' after the loop for the first cursor. When the first cursor hit the end, you condition handler is setting NOT_FOUND = 'Y', which will exit the loop. You use the same check for the second loop,k but you never reset NOT_FOUND which is now 'Y'.
Andy