If commands are stored on an external file, say commands.S in the working directory work, they may be executed at any time in an S-PLUS session with the command
source("commands.S")
Similarly
sink("record.lis")
will divert all subsequent output from the terminal to an external file, record.lis. The command
sink()
restores it to the terminal once again.