Tags

, ,

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 this link

http://publib.boulder.ibm.com/infocenter/db2luw/v8/topic/com.ibm.db2.udb.doc/ad/c0007210.htm

Important SQL CODES and ABEND CODES
SORT JOIN – TO JOIN TWO FILES BASED ON A KEY
KNOW YOUR MAINFRAME
REXX – INITIAL SETUP
DB2 SQL Query to read COMP (COBOL) data stored in CHAR column
DB2 Performance – Using SET vs SYSDUMMY1 table
DB2 Performace – Predicates Processing Order
DB2 External Stored Procedures
DB2 UPDATE QUERY – UPDATE TABLE1 FROM TABLE2 DATA
DB2 PERFORMANCE ISSUE (When using EXISTS)
HOW DOES DB2 INTERNALLY (PHYSICALLY) STORE THE DATA
HOW DO YOU FIND WHO HAS ACTUALLY LOADED THE DB2 TABLE RECENTLY
TERMINATE A STOPPED DB2 UTILITY
SELECT UNIQUE RECORDS USING “GROUP BY”
DB2 and SQL INTERVIEW QUESTIONS
DB2 TIPS
Optimistic Locking vs. Pessimistic Locking
DB2 BIND OPTIONS and ISOLATION
Is SCHEMA name necessary for DYNAMIC QUERY
DB2 SQL – REPLACE CHARACTERS WITH ACCENTS (NON ENGLISH ALPHABETS)
Advertisements