DynamicSQL with DB2/400

Hi,
I have a Dynamic SQL which as follows

select lxiv1, lxiv2 from ${tablename}

the tablename(variable) in this case will be: @G5F0800 or @G6F0900

when I run this, I get ‘Descriptor no valid’

Any ideas on this?
Thanks.