DBMS_OUTPUT.PUT_LINE is not returning data while using cursor as in below code
I used boolean to compare amount from the table
SET SERVEROUTPUT ON;
DECLARE
--declaration of variable
x_id test.saa.id%TYPE;
x_acctname test.saa.acctname%TYPE;
x_curbal test.saa.balamt%TYPE;
x_sid test.saa.sid%TYPE;
--setting of the boolean value default to null
b_lowamount BOOLEAN := false;
--declaration of cursor
CURSOR custbal IS
SELECT id,acctname,bal_amt,sid
FROM
test.saa WHERE ROWNUM <= 1000;
BEGIN
--checking cursor is open or not
IF NOT ( custbal%isopen ) THEN
OPEN custbal;
END IF;
LOOP
FETCH custbal INTO
x_id,
x_acctname,
x_curbal,
x_sid;
EXIT WHEN custbal%notfound;
CONTINUE WHEN custbal%found;
--begin another
BEGIN
b_lowamount := ( x_curbal < 10 );
IF b_lowamount THEN
dbms_output.put_line('The customer having '|| x_acctname|| ' with sol_id '|| x_sid|| 'with balance RS. '|| x_curbal);
ELSE
dbms_output.put_line('The customer having '|| x_acctname|| ' with sol_id '|| x_sid|| 'with balance RS. '|| x_curbal);
END IF;
END;
END loop;
end;
didn't returned anything although the procedure completed successfully