Multiple ways:

1) use spool (if connected to the host)
2) use the utl package.

Badrinath