Hi,

Is there any method we can obtain the error code from a variable from with the DB2 CLP enviroment after executing a query?

What I am looking for is similar to the example given below:

db2 <<!EOF

<db2 query>

echo ERRORCODE

!EOF


Thanks,
Shibu