Add please Milestone 3.5.0 to the bug report system.
It seams that script Store result of SQL in a file does not allow recursive queries. Try
WITH days (d) AS ( SELECT DATE('2013-01-01') d FROM sysibm.SysDummy1 UNION ALL SELECT d + 1 DAY FROM days WHERE d < CURRENT DATE ) SELECT * FROM days
The selected SQL is not a SELECT statement. and
Could not create the Progress Monitor.
Example is for DB2, but in Teradata queries can also start with 'WITH'.