Hi Nick,
I supose you are genned to Java then I could suggest bellow:
1. You must be have a main DB Connect defined in generated option.
2. To define when you have a second DB2 Connect.
2.1. Add a new parameter in your rununit.properties, exemple:
my.second.dbconnect=SQLSERVER
2.2. On egl stmt get this parameter
mySecondDb string = sysLib.getProperty("my.second.dbconnect");
2.3. Use this new variable to choose which DB Connect do you want
if (mySecondDb == "SQLSERVER")
connect to sqlserver
else;
connect otherwise
end;
I hope help you.
Regards,
Hsieh
Hsieh