Hrm all you want to do is print rows if they exist? Can't you just spool the sql query in SQL*Plus?

But either way, if all you want to do is load a query and print what is inside, this is a little easier.
<font face="courier">
declare
&nbsp;&nbsp;cursor c1 is
&nbsp;&nbsp;&nbsp;&nbsp;select c.id, c.name
&nbsp;&nbsp;&nbsp;&nbsp;from catc
&nbsp;&nbsp;&nbsp;&nbsp;where child_count != (select count(child_Cat_id)
&nbsp;&nbsp;&nbsp;&nbsp;where r.parent_Cat_id = c.id
&nbsp;&nbsp;&nbsp;&nbsp;group by parent_Cat_id;
begin
&nbsp;&nbsp;for rec in c1 loop
&nbsp;&nbsp;&nbsp;&nbsp;dbms_output.put_line ('id = ' || rec.id);
&nbsp;&nbsp;&nbsp;&nbsp;dbms_output.put_line ('name = ' || rec.name);
&nbsp;&nbsp;end loop;
end;