binoyshill:

my requirement is that whenever i run a SQL command at sql prompt
my last SQL command or ,alternatively, the current command should get spooled implicitly or automatically to a txt file.
Looks that something to do with auditing.

Why dont you audit all the successful statements of the session and transfer the data to a text files from Data Dictionaries.