Why don't HOST comands appear in the spool? spooltest.sql:

SPOOL test.log
CLEAR SCREEN
SET VERIFY OFF
PROMPT Queries will appear in spool
select sys_context('USERENV', 'INSTANCE_NAME') from dual;
PROMPT Output from the HOST command will not
HOST ECHO %COMPUTERNAME%
SPOOL OFF


sqlplus output:

Queries will appear in spool

SYS_CONTEXT('USERENV','INSTANCE_NAME')
---------------------------------------------------

wibble

Output from the HOST command will not
AWESOMESERVERNAME

SQL&gt;


test.log:

Queries will appear in spool

SYS_CONTEXT('USERENV','INSTANCE_NAME')                                          
--------------------------------------------------------------------------------
wibble

Output from the HOST command will not


If it's not possible to capture HOST output, can someone please suggest a workaround.
Yeah spool only captures output from SQLPlus itself. Try this - Before invoking your OS command, turn spooling off. Then pipe the output to the end of the file. Then you can use spool append to start spooling from where you left off again:

spool test.log
select blah from blah;
spool off
!echo %COMPUTERNAME% &gt;&gt; test.log
spool test.log append 
select * from argh;