- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to bind multiple versions of a DB2 program into a package?
Packages are DB2 database objects which hold the executable forms of SQLs which are used in COBOL-DB2 programs. The packages are stored in a catalog table and contain the strategy/tables/columns/predicate associated with the SQL statements.
If there is a DB2 table ORDERS_TEST in test environment and ORDERS_PROD in production environment, then we need two versions of COBOL-DB2 program (which will access these tables) — one for test and the other for production.
Although both programs will be carbon copy of each other, the only difference lies in the SQL statements. The test version of the program will use table ORDERS_TEST in SQL statements and the production version of program will use ORDERS_PROD table in SQL statement. In order to achieve this versioning, we need to bifurcate the packages of the program.
To keep the multiple versions of the package, we have to use the VERSION option in the pre-compilation step. Therefore, we can give the VERSION(TEST) for the test version of the package and VERSION(PROD) for the production version of the package.
Following is an example:
Example
//BIND EXEC PGM=IKJEFT01 //STEPLIB DD DSN=DIS.TEST.LOADLIB,DISP=SHR //SYSOUT DD SYSOUT=* //SYSTSIN DD * DSN SYSTEM(TB3) BIND PLAN(PLANA) - PKLIST(PACKA) - VERSION(PROD) - ACQUIRE(ALLOCATE) - ISOLATION (RS) /*
- Related Articles
- How to BIND a DBRM into a PACKAGE and PACKAGE into a PLAN?
- How to BIND a DBRM directly into a PLAN?
- How to bind multiple events with one "bind" in Tkinter?
- When a DB2 subprogram undergoes changes, do we need to BIND it with its program?
- How to use multiple versions of jQuery on the same page?
- How to precompile a COBOL-DB2 program?
- What is the execution result when non-SQL changes are made in a DB2 program without BIND?
- How to store a NULL value in a particular column of a DB2 table using COBOL-DB2 program?
- How to install a Python package into a different directory using pip?
- How to execute a COBOL-DB2 program PROGA of plan PLANA?
- How to package a Tkinter program to share with people?
- How to image copy the entire DB2 table TAB1 into a dataset?
- How to run Java package program
- How to bind a key to a button in Tkinter?
- What are bind variables? How to execute a query with bind variables using JDBC?
