Я думаю, что ваш курсор должен называться 'cc' вместо 'ab'.
DECLARE
CURSOR ab -- This is a corsor. A prepared statement which you can call during executing
IS
SELECT emp.ename, emp.sal, dept.loc
FROM emp JOIN dept ON emp.deptno = dept.deptno;
TYPE tbl_join IS TABLE OF cc%ROWTYPE; -- this is a table-type. Like an array of antoher type. In this example it is an array of the result of cc.
l_table tbl_join; -- this is a variable of the table-type, which you can fill with data
BEGIN
OPEN cc; -- here you open the cursor cc. I guess your cursor 'ab' (1st row) should be named 'cc' and opened here.
FETCH cc BULK COLLECT INTO l_table; -- you read all you data from the cursor and stick it into you variable 'l_table'.
CLOSE cc; -- you're done with you cursor, because of this you close it.
FOR indx IN 1 .. l_table.COUNT -- a for-loop to loop through you table-variable.
LOOP
-- you access the elements of your table with the loop-variable 'indx'.
DBMS_OUTPUT.PUT_LINE (l_table (indx).ename); -- you access the fiels of your element.
DBMS_OUTPUT.PUT_LINE (l_table (indx).sal);
DBMS_OUTPUT.PUT_LINE (l_table (indx).loc);
END LOOP;
END;