Is it possible to reference a host variable when using "Declare global temporary table XYZ as ..."?
We are getting an error (SQL0090) when we try it and we don't understand why it's not allowed (or what we're doing wrong). Here is the code from our RPG program;
// Create Temporary Table to Collect Sales Data.
exec sql declare global temporary tabletmpISSALES as
SQL0090 Host variable not permitted here
andSHTYPE = 'N'
order bySHCMP#,SHLOC#) ;
We have a workaround, but it would be much more convenient if the example above would work (or something similar).