Common Attribute Values for the DEFINE and INVOKE Behaviors
The following attribute values apply to dynamic SQL statements in plans or packages that have the DEFINE, or INVOKE behavior:
You can execute the statement SET CURRENT SQLID in a package or plan that is bound with any DYNAMICRULES value. However, DB2 does not use the current SQL ID as the authorization ID for dynamic SQL statements. DB2 always uses the current SQL ID as the qualifier for the EXPLAIN output PLAN_TABLE.
As mentioned earlier, if the value of installation option USE FOR DYNAMICRULES is YES, DB2 uses the application programming default values that were specified during installation to parse and semantically verify dynamic SQL statements. If the value of USE for DYNAMICRULES is NO, DB2 uses the precompiler options to parse and semantically verify dynamic SQL statements.
GRANT, REVOKE, CREATE, ALTER, DROP, and RENAME statements cannot be executed dynamically.