Reference: DB2 for iSeries version. Each environment has a table containing positional column information about other tables. Since the data in this table is static and must be generated each time the table is modified, problems can occur if it is outside the step.
All positional data exists in QSYS2.SYSTABLESand QSYS2.SYSCOLUMNS, therefore, it should be possible to create a view that contains the same information, but is guaranteed to be correct. Then older programs should be able to use this view.
The only problem is that the view needs to know about the current schema (data library in iSeries) in order to get the necessary information from QSYS2 tables, since they contain data for all the schema / library.
Any ideas on whether this is possible, and if so, how?
EDIT: Re: Ryan Gill
In fact, I want the view to select rows in QSYS2.SYSCOLUMNS, using the current library name in its criteria. If I have a table T in several libraries, then I SYSCOLUMNSwill have data for instances of T in each library.
The inelegant solution is that I could store the name of the library / schema in each library, and the view would use that value in the selection ...