This is on a SUN OS. DB2 version 8.FixPack4.
I have tried to assign as follows:
db2 -tvf myfile.sql > myfile.log
------------------------------------------
connect to alias user userid using password;
Select *
..from my.table
where condition is false;
!DB2ERROR=$?;
quit;
-----------------------------------------
The SQLCODE should be a -100. I have done application programming and would typically look in SQLCA to see what the error code is.
What I would like to do is interpret the error code on the fly without creating a stored procedure.
Thanks in advance.
Jeff