Local Binding a Package/Plan
BIND PLAN(IMSONLY) - PKLIST(DSN8IC91.*) - ACTION(ADD) - ISOLATION(CS) - OWNER(DEPTM92) - QUALIFIER(PRODUCTN) - CACHESIZE - ENABLE(IMS)
Remote Binding a Package/Plan
To BIND the DBRM PROGA at the location PARIS and in the collection GROUP1 BIND PACKAGE(PARIS.GROUP1) COPY(GROUP1.PROGA)
In the above Package is located at PARIS. Collection is group1. BIND PLAN (PLANB) PKLIST (*.GROUP1.*)
Then, include remote package list into local Plan
SQLCode Vs. SQLSTATE in DB2
SQLSTATE – It gives more information about last executed SQL. Weather the SQL is successfully executed or not. It comprises of 5 letters. First 2 letters gives more information about last executed error.
02-No data is returned as a result of SQL exected
Since SQLSTATE is updated after every execution of SQL, we need to check information about SQLSTATE. ‘00000’ states that SQL is executed successfully.
Main use of SQLSTATE is working with remote systems.
SQLCODE- It is a return code obtained when you execute a SQL query. All negative values are errors. Refer various SQLCODES returned from DB2 : https://srinimf.com/2010/10/23/sql_error_codes/