Answers to your questions:
Both #1 and #2 - populate a physical table with the INSERT statement.
#3 - Use the equivalence operator to test variables of same type.
#4 - Well, the "record group" you declare is only initialized (but no
values are being populated in it), the arg val ("p_arg) is of both IN OUT
(only IN is needed) and all this loop is doing right now is making
"colb" equal to a value of 1 if "cola" equals the "p_arg".
First, I think you'll need to place values into this RG (using a Cursor
from the table). Once the RG has values, now you'll be able to
get something out of it with your FOR loop.