I have a database procedure with some out parameters(all of them are VARCHAR2(STRING)).
Here is how I am storing the out parameters returned by the database procedure
set -A file_var
${file_var[0]}
${file_var[1]}
${file_var[2]}
${file_var[3]}
${file_var[4]}
${file_var[5]}
set -A file_var `$ORACLE_BIN/sqlplus -s UN/PW@SID @pass_out.sql`
print ${file_var[0]} ${file_var[1]} ${file_var[2]} ${file_var[3]} ${file_var[4]} ${file_var[5]}
var0=${file_var[0]}
var1=${file_var[1]}
var2=${file_var[2]}
var3=${file_var[3]}
var4=${file_var[4]}
var5=${file_var[5]}
echo $var0
echo $var1
echo $var2
echo $var3
echo $var4
echo $var5
The column values from the database are displayed.
Everytime I run the shell script it executes the db procedure and returns the values to the variables.
I have created couple other variables
PROCESS_LOAD='LOAD'
PROCESS_COUNT='COUNT'
QUESTION:
I am trying to compare the value in $var4 with $PROCESS_LOAD. IF the strings matchup, I want to run DATA LOADER process.
Similarly, when I run the shell script next time, I want to compare the value in $var4 with $PROCESS_COUNT. If the strings matchup, I need to call the COUNT PROCESS.
Any help is appreciated!