Here's a quick rewrite:
select * from collat.dbf into cursor QUERY1
QUERY = 'E'+SUBSTR(SYS(3),2,7)+'.DBF'
SELECT QUERY1
COPY TO (QUERY)
USE (QUERY) IN 0 ALIAS QUERY
SELECT QUERY
USE IN QUERY1
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.