Gen 8.6 GUI Windows Managers running as "batch" programs under Windows/C/SQL Server environment were running fine in Prod. Code changes were made to one of the programs and now even though everything gens/compiles fine when the EXE file is executed, it just hangs. Nothing has changed from the database side because when redeployed the old executables work fine.
From the OLD and NEW msi installations, the Gen runtimes were compared and seem to be all the same dates. Using the Toolset showed the model has 2 DBs, xxxDB and SQLDB. The batch.ief\c directory showed all icm files have "dbname=SQLDB" except CASCADE.icm which has "dbname=xxxDB." Also, *.c files have ' (void*) "SQLDB".'
Gen 8.6
The ODBC connection issue was resolved by deleting SQLDB connection and using only xxxDB.
As these are Window Managers, their target database can also be changed in the Build Tool Profile token OPT.DBCONNECT at build time or by using parameter "/db-...." at runtime.
At runtime the iefgdic.ini file is used to store DB connection parameters for the target Database name: Testing and running applications for Windows IT.
Both the ICM generator and the GUI Window Manager generator use similar logic to decide what Database name to use. They follow the USES association from the TECHDESN object. In the given model, there are three DATBAS2 objects associated with the TECHDESN object. The generator logic just uses the first DATBAS2 object that is found.
One possible explanation for why the code is generating differently today than it did before, is if the model was copied or something happened that caused the objects to create different object ids. This could explain why the SQLDB DATBAS2 object is being found first now.