The following illustrates use of the SELECT ... EXPORT AS ... INTO function:
execute ibeblock
as
begin
SELECT * FROM RDB$FIELDS
EXPORT AS DBF INTO 'D:\TestExport.dbf'
OPTIONS 'ConvertToDOS; LongStringsToMemo; DateTimeAsDate';
end