I have a shell script which takes at the command prompt options like
ss1.sh -F SCOTT -T JOHN
F- From User
T- To User
I want to pass the From User(SCOTT) Value to another script
ss2.pls (This script runs a PL/SQL Program). Depending on the FromUser value in the ss1.sh script i have to code accordingly in the ss2.pls script.
How can i pass the FromUser Value in the ss1.sh to ss2.pls script.
Exec Sequence: First ss1.sh script is run then ss2.pls is run.
I have a shell script which takes at the command prompt options like
ss1.sh -F SCOTT -T JOHN
F- From User
T- To User
Inside the ss1.sh there is a call to ss2.sh(inside this shell script there is a call to proced.pls, in this program(proced.pls) i have to pass the T -Touser value from the ss1.sh shell script).
Ex:
vi ss1.sh
{
Function()
{
/db2/home/ss2.sh $ORACLE_SID
}
}
vi ss2.sh
{
sqlplus -s / as sysdba << !
set verify off
@/db2/home/proced.pls
}
vi proced.pls
{
declare
cursor sym_owner is select owner from all_synonyms where owner=UPPER('$ToUser'); -- I want the value of ToUser taken
-- from ss1.sh script here in the SQL
-- statement.
..........................................................................etc
}
ss2.pls (This script runs a PL/SQL Program). Depending on the ToUser value in the ss1.sh script i have to code accordingly in the ss2.pls script.
How can i pass the ToUser Value in the ss1.sh to ss2.pls script.
I have merged this with the thread you started when you asked the same question several days ago. Please read the rules particularly the ones regarding bumping posts and cross/duplicate posting.
Why can't you just do something along the lines of