Well, this is a job for dynamic sql.
In 8i I'd do that in this way:

Code:
--declare cursor variable:
type type_cc is ref cursor;
my_cursor type_cc;
...
begin
...
  open my_cursor for 
    'SELECT DISTINCT CATEGORYNAME FROM BCOMP_MAP WHERE BCNAME_ID IN ('||Comp_list||')';
Then you can go through the cursor with FETCH statement ...

HTH,
Ales