For a dynamic query prepared in a DB2 COBOL program, the schema name should be provided if the BIND option DYNAMICRULES is not used while BINDING.
DYNAMICRULES={BIND | RUN}, NODYNAMICRULES Specifies which authorization identifier to use when dynamic SQL in a package is executed.
BIND | Indicates that the authorization identifier used for the execution of dynamic SQL is the package owner. |
RUN | Indicates that the authorization identifier used for the execution of dynamic SQL is the authid of the person executing the package. |
So use DYNAMICRULES(BIND) as an option while BINDING, so you need not provide the schema name. And it will picked up from the package provided while binding. Check the below link
http://publib.boulder.ibm.com/infocenter/db2luw/v8/topic/com.ibm.db2.udb.doc/ad/c0007210.htm
If you would like to Earn Free Stocks, Credit card Points and Bank account Bonuses, Please visit My Finance Blog
You may also like to look at: