Using a pl/sql script to run and auto-answer user input prompts of another pl/sql script

Viewed 26

I am trying to automate the generation of a particular Oracle report. I'm using a combination of a bash shell script and a pl/sql script. The shell script connects to sqlplus, passes some info to the pl/sql script and then runs the pl/sql script.

This Oracle report can be manually generated by running an Oracle created pl/sql script and then answering its prompts for user input. These prompts are for things like what format I want the report to be in and what db instance to run the report against. I'm having trouble coming up with or finding a way to have my pl/sql script automatically answer the prompts of the Oracle pl/sql script. Executing the Oracle script from my script isn't an issue and I have all the answers to the questions predetermined but I just don't know how to get my script to answer them. Is this something that's even possible to do? Any tips would be much appreciated.

For example: Oracle's pl/sql script prompts: type "text" for plain text type "html" for html format What format do you want this report? waiting for input

I want my script to fill in "text" and then continue

Thanks in advance for any advice

0 Answers
Related