I have a db2 stored procedure on my database which require 3 parameters, I have the following db2 command in a sql script
CONNECT TO SAMPLE;
CALL BACKUP(INPUT_1, INPUT_2, INPUT3);
Usually, I would just invoke this sql script from my shell script like below
db2 -tf my_sql_script.sql -z logfile.txt
However, how can I pass these 3 user input parameters from shell script to my sql script? Can this be done?
If not, I can simple call invoke these sql command directly in my shell script, but how would I redirect all the messages from executing my DB2 stored procedure to a log file?
Thanks in advance!