Here's my situation. I am attempting to create a shell script that will process every test file in a UNIX directory through a PL/SQL call but am having trouble b/c I have to do it by invoking a separate shell script.
The one I commented out works fine, except that it produces no output because the PL/SQL session is set up to not display DBMS_OUTPUT statements (I have tried but failed in the past to get that changed), so I have to call a separate file "load_RF.sql".
However, PL/SQL doesn't know what to do with $testfile. How can I pass the value of testfile into the PL/SQL script? I really don't want to hard-code the stored proc parameters in the PL/SQL script!
Code:
for testfile in TestFile*.txt; do
echo "Testing load file $testfile"
# $HOME/bin/qs "exec RCPI.CLOSEOUT_PKG.load($testfile)"
$HOME/bin/qs "@$HOME/sql/load_RF.sql"
done
The one I commented out works fine, except that it produces no output because the PL/SQL session is set up to not display DBMS_OUTPUT statements (I have tried but failed in the past to get that changed), so I have to call a separate file "load_RF.sql".
Code:
SET SERVEROUTPUT ON
EXEC CLOSEOUT_PKG.load($testfile)
EXIT
However, PL/SQL doesn't know what to do with $testfile. How can I pass the value of testfile into the PL/SQL script? I really don't want to hard-code the stored proc parameters in the PL/SQL script!