I'm not 100% sure what you want to do. If you want to read a file of SQL statements and produce a file of output, have a look at UTL_FILE. You will have to read the input with UTL_FILE and construct the SQL statement in memory and recognise the end of the statement to know when to do an EXECUTE IMMEDIATE - the SQL will need to produce a single character string as output (otherwise you will have a **** of job constructing an INTO clause) - you then write the output with UTL_FILE.

BUT I suspect you can avoid all this if you look a what your real requirements are . . .