do you mean spool the output of a script?

In which case use SPOOL filename

Or to save a sql script SAVE scriptname

Regards