Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sqlplus command host

407048Nov 2 2007 — edited Nov 3 2007
I am using sqlplusw on my windows XP pc to access my oracle 10.2.0.3 database(residing on solaris)

From my pc, I am executing a script s.sql that accepts a parameter (using sqlplus accept command)
The script after receiving this input parameter, executes 2 anonymous pl/sql blocks (all in the s.sql). One of these pl/sql blocks have 5 variables (declared in the block's declare section). The 5 variables obtain values when the code processes. I have confirmed this by dbms_output.put_line displays.


Now, I would like to include a host command in my s.sql script. The host command should run a windows java program taking in 5 parameters -- which should be my 5 variables that the anonymous pl/sql block had.

For example
In sqlplusw,
SQL> @s.sql
Enter value : 123456789
<code processes and following is diplayed>
var1 is : var1value
var2 is : var2value
var3 is : var3value
var4 is : var4value
var5 is : var5value

host javapgm var1value var2value var3value var4value var5value


I understand that the host command can take parameters, but mine are not sqlplus parameters, whereas they are pl/sql variables
Is this possible by any chance ? Any other ways or ideas are appreciated as well

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2007
Added on Nov 2 2007
3 comments
833 views