Select all from table using procedure oracle
You open two cursors  but close the outer one before the inner one

open gen_row; -- open the outer cursor...this semicolon seems odd
for data in(SELECT * from testnirmal)
loop
fetch gen_row into a1;
open gen1_row(a1);
fetch gen1_row into a2;
dbms_output.put_line(a2);
close gen1_row;
end loop;
close gen_row;--here you close the outer cursor
close gen1_row; --here you close the inner cursor when it is out of scope