Custom SQL issue

Hi,

I am trying to execute the below SQL query from wm adapter service(custom sql).

set pagesize 0
set closep |
spool /tmp/df_order_forecast.dat
select * from cdrmgr.forecast_orders;
spool off

but getting error (42000/922) ORA-00922: missing or invalid option,

but the same sql query I can able to run from SQL Developer/ toad.

even I tried to run one by one,

“set pagesize 0” sql in wm adapter service(custom sql), but no use, getting same error

"clntMDD_I_DNF.Db_Operations:invokeScript.
[ADA.1.316] Cannot execute the SQL statement “set pagesize 0”. "
(42000/922) ORA-00922: missing or invalid option
"

Can anybody help me on this

Thanks & Regards,
Sha[/b]

We solved the issue.

Thanks,
Shami