You can use the GET DIAGNOSTICS statement only within the compound statement of a multistatement procedure: o In interactive SQL o Embedded in host language programs to be precompiled o As part of a multistatement procedure in an SQL module o In dynamic SQL as a statement to be dynamically executed