Sergey -
I'm probably breaking protocol here but since you helped me with an earlier part on this I thought it might be OK to ask you directly,
If I SELECT from a table that is not currently open into a cursor, the source table is opened in the process. If the source table is in a variable, how can I then close it so it is available to other programs?
lcSourcetable = 'd:\mydir\mytable'
SELECT * from (lcsourcetable) into cursor crsNew
use in (lcSourceTable)