Use this statement to start logging executed SQL statements to a log file.
START LOGGING file-name
The START LOGGING statement starts copying all subsequent executed SQL statements to the log file that you specify. If the file does not exist, Interactive SQL creates it. Logging continues until you explicitly stop the logging process with the STOP LOGGING statement, or until you end the current Interactive SQL session. You can also start and stop logging by clicking SQL > Start Logging and SQL > Stop Logging.
SQL/2003 Vendor extension.
Start logging to a file called filename.sql, located in the c: directory.
START LOGGING 'c:\filename.sql';