Hi,
I am working on a utility to extract configuration tables across different DB2 schema. There's a bit of programming required since the configuration table data are stored in a fixed length column.
The utility has 2 input param --- table name and the target table schema.
We are using DB2 for iSeries.
The schemas are:
DEV - Development environment
UTT - Unit Testing
QAT - QA Testing
I created the procedure in the DEV environment. Here's the structure. The "Set Schema" statement doesn't work and the configuration extract is always from the DEV schema.
Appreciate your help.
Thanks,
Krisha
I am working on a utility to extract configuration tables across different DB2 schema. There's a bit of programming required since the configuration table data are stored in a fixed length column.
The utility has 2 input param --- table name and the target table schema.
We are using DB2 for iSeries.
The schemas are:
DEV - Development environment
UTT - Unit Testing
QAT - QA Testing
I created the procedure in the DEV environment. Here's the structure. The "Set Schema" statement doesn't work and the configuration extract is always from the DEV schema.
Code:
create procedure DEV.extractTbl ( in tblName char(8), in tblSchema char(8) ) Begin Atomic set SCHEMA tblSchema; declare cursor (select * from configTbl where tbl = tblName; fetch; process/format fetch results write fetch results in a temporary table; end;
Thanks,
Krisha
Comment