why call external scripts, put the sql query/or create corresponding procedure and call from inside dbms_sql.