help in JDBC Adapter service

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

the above query, pick the data from tables and write flat file separateded by ‘|’ and write file in /tmp/ directory

in SQL developer it is working fine , i want to do in JDBC Adapter, which adapter service will full fill above requirement, do i need to go for adapter service or stored procedure, i have tried with customSQL adapter service but i didnot acieve this.

am using oracle database and webMethods 7.x

Regards,
anil kumar ellendula