Hello all,
I have a batch file as follows:
echo on
echo >C:\Jobs\DB2_customer.log
C:\Progra~1\IBM\SQLLIB\BIN\db2cmd.exe /c /i db2 -tvwf C:\Jobs\DB2_unload_customer.txt -es -s -z C:\Jobs\DB2_customer.log
echo errorlevel
exit ERRORLEVEL
The content of is a simple extract:
CONNECT TO POC_SEC;
EXPORT TO "c:\jobs\customer.txt" OF DEL MESSAGES "c:\jobs\customer.msg" SELECT * FROM USUJAR0.CUSTOMER;
CONNECT RESET;
I have run this natively under my authority and it runs fine. The problem is I am trying to run this with a sceduling package (we have Tidal). The user id that is running this through Tidal does not have authority purposely i.e. I am trying to test a failure. Unfortunately, as far as Tidal is concerned this script returns a zero return code. If I look in the DB2_customer.log I can clearly see the bad SQL message for the connect statement. Is there something that needs to change in my job or something that needs to be set up in Tidal to get the bad SQL code? Thanks in advance for your help.