Hi
I have discovered an error (I think) in generated java code, when I use the useCurrentSchema option, and the SQL statement contains a UNION.
The second part of the generated sql statement does not contain the schema name:
EGL statement:
try
open F000PSF_RSI01
with #sql{
SELECT ADCOMP, ADUSER
FROM VADMAUTH AD
WHERE
ADUSER = :ADUSER
UNION
SELECT USCOMP, USUSER
FROM USERBAS
WHERE USUSER = :ADUSER
ORDER BY 1 ASC
}
into ADCOMP, ADUSER
for F9ADFDB ;
onException F9ERS() ;
end
Generated java statement:
String $sql = "SELECT ADCOMP, ADUSER "
+ "FROM " + ezeProgram.egl__io__sql__SQLLib.currentSchema.getValue() + "VADMAUTH AD " + "WHERE ADUSER = " + "? " + "UNION SELECT USCOMP, USUSER FROM USERBAS WHERE USUSER = " + "? " + "ORDER BY 1 ASC ";
I need to use the useGeneratedSchema option, as the Schema name can be picked dynamically within my EGL web application, so adding the schema name outside the application is not possible.
Any suggestions what to do ? Or is this a EGL generation bug ?
Environment: RBD v9.5.0.1. Generation as EGL Web transactions, running within WAS Liberty and Tomcat on Windows and Linux.
TIA
Morten Hansen, IBM Denmark
mohaIBMDK