I will keep my question here brief and link to a more detailed version so the code is readable.

I am implementing SQL error handling based on this page: https://www.ibm.com/developerworks/community/forums/html/topic?id=d2c49b79-5a01-46f7-9a11-b9de0f2b0e02#3b47a829-e864-44db-99c4-653a7547add2

GET DIAGNOSTICS is incorrectly returning an SQLSTATE of 00000 when it is first called in a newly activated service program. All subsequent calls return correctly. Executing an otherwise unnecessary SQL statement beforehand eliminates the issue. The service program containing the GET DIAGNOSTICS statement is bound-by-reference to the service program containing the erroring SQL statement and activates *IMMED in group *CALLER.

Please see my full question here: http://stackoverflow.com/questions/23643045/initialize-activate-sql-prior-to-get-diagnostics

I will be happy to answer my own question on that site with any information sent to this list.

Thanks for reading,

Related ...

This thread ...

Return to Archive home page | Return to MIDRANGE.COM home page