Unanswered: How to return value from script and display information
I want to know how to return 0/-1 from sql to ksh script. My sql need to be called from unix script. Then, some checking will be proceed in sql, and return -1 if checking result is abnormal. Also, I need to display information during checking, but it doesn't work
My program as below.
db2 "set serveroutput on"
db2 -td/ +o -f test.sql << EOF1 2>&1
if [ $? -eq 0 ]
select count(*) from ....
if count > 0 then
Please kindly to let me know what wrong of above program. Thanks !