Well, PERL is not a bad idea, except that I will have to learn it. Basically, what I am trying to do is a kind of an administrative tool and the requirement is as follows.

menu - You can choose
1. to view the stats on a statement run by a user (sql query -> disk reads, buffer gets, optimiser etc) --> statement_stats.sql (Needs the NT user ID, else fetches for all)
2. View tablespace free, occupied sizes, the largest fragment available. --> free_tablespace.sql
3. View the storage used by each object -> tables, procedures, triggers etc... --> table_size.sql (Needs the object Name, else fetches for all)
4. To view the stats on tables, like when was it last analyzed etc... --> table_stats (needs table name or fetches for all)

On choosing the option, I pass the value to an anonymos block as I need to do a SWITCH - CASE, and choose the appropriate sql (shown after -->).
Inside each sql, I may need a few other parameters to be entered, like the NT user id etc... so I can't have them in a package or procedure as I can't have the & there (if I do, I have to set the scan off while compiling and hence can't make use of the &).
Well, as you had suggested PERL or Pro*C would be the best idea. I hope I have made myself clear now.