Guest_imported
New member
- Jan 1, 1970
- 0
Environment - DB2 OS/390. IMS-DC & COBOL.
I am looking for alternative to Dynamic SQL feature.Can any one explain or provide some info how to accomplish this.I have two tables - WorkTBL and BaseTBL.
Note - the copylibs for these tables are identical but has different table names. Nightly batch jobs updates BaseTBL with days worth of data from WorkTBL. We want our online inquiry systems to read WorkTBL or BaseTBL based on an input entered on the screen which will determine set the criteria whether to read the WorkTBLor BaseTBL.
Now my question is, how do I code single sql statement to
access either table. In other words how to pass the tables names to the sql statements to select/fetch data from the desired table during the runtime instead of coding two separate statements to do the same thing. Please provide samples(code) and reference materials if any available.
TIA. Nexus
I am looking for alternative to Dynamic SQL feature.Can any one explain or provide some info how to accomplish this.I have two tables - WorkTBL and BaseTBL.
Note - the copylibs for these tables are identical but has different table names. Nightly batch jobs updates BaseTBL with days worth of data from WorkTBL. We want our online inquiry systems to read WorkTBL or BaseTBL based on an input entered on the screen which will determine set the criteria whether to read the WorkTBLor BaseTBL.
Now my question is, how do I code single sql statement to
access either table. In other words how to pass the tables names to the sql statements to select/fetch data from the desired table during the runtime instead of coding two separate statements to do the same thing. Please provide samples(code) and reference materials if any available.
TIA. Nexus