This article explains how to use different qualifiers without having to hard code them in SQL Option.
Problem:
Previously it was not possible to access tables in the same transaction where the tables had different owners or qualifiers. Most tables in my application are under jit7.table however some programs access things under a different ID like dvt7.table which I currently can't access when doing Mainframe Express connecting to the mainframe for my DB2. How can I access DB2 tables with different qualifiers?
Resolution:
Micro Focus now supports the precompiler directive COLLECTION-ID. This will embed the supplied value in the compiled code. It is passed to the XDB Link which will then use that package set for any requests. This should allow you to have program A (PGMA) using collection id A (COLLIDA) and program B (PGMB) using collection id B (COLLIDB). If PGMA calls PGMB, the transaction will start using COLLIDA. When PGMA calls PGMB, COLLIDB will be the effective package set. When PGMB returns back to PGMA, COLLIDA will be in use again.
The programs using JIT7 would be compiled with COLLECTION-ID=JI_INGM (which you have already created). You would complete a second bind with a different collection id for dvt7 tables. The bind would be completed with a default qualifier of DVT7 and dynamic rules= bind and any programs associated to this qualifier would be compiled with COLLECTION-ID= whatever the new collection ID name was used to bind. You would then be able to access tables with both qualifiers.
#EnterpriseDeveloper
#MFDS