Neoview Script Guide (R2.2)
Logging Output
To log a Neoview Script session, use the SPOOL or LOG command. The SPOOL and LOG
commands record into a log file the commands that you enter in the Neoview Script interface
and the output of those commands.
• “Starting the Logging Process” (page 68)
• “Stopping the Logging Process” (page 69)
• “Viewing the Contents of a Log File” (page 69)
Starting the Logging Process
To start logging, enter one of these commands:
• SPOOL ON or LOG ON
• SPOOL log-file or LOG log-file
For more information, see the “LOG Command” (page 96) and the “SPOOL Command” (page 137).
SPOOL ON or LOG ON Command
The SPOOL ON or LOG ON command logs information about a session in the sqlspool.lst
file, which Neoview Script stores in the Neoview Script bin directory:
• On Windows:
hpnvs-installation-directory\nvscript\bin\sqlspool.lst
hpnvs-installation-directory is the directory where you installed the Neoview
Script software files. For more information, see Table 2-1 (page 34).
• On Linux or UNIX:
hpnvs-installation-directory/nvscript/bin/sqlspool.lst
hpnvs-installation-directory is the directory where you installed the Neoview
Script software files. For more information, see Table 2-1 (page 34).
For example, this SPOOL ON command starts logging the session in the sqlspool.lst file:
SQL>spool on
SPOOL log-file or LOG log-file Command
The SPOOL log-file and LOG log-file commands record information about a session in
a log file that you specify. If you specify a directory for the log file, the directory must exist as
specified. Otherwise, an error occurs when you try to run the SPOOL or LOG command. If you
do not specify a directory for the log file, Neoview Script uses the Neoview Script bin directory.
For example, this SPOOL log-file command starts logging the session in the
persnl_updates.log file in the C:\log directory:
SQL>spool C:\log\persnl_updates.log
Using the CLEAR Option
The CLEAR option clears the contents of an existing log file before logging new information to
the file. If you omit CLEAR, Neoview Script appends new information to existing information
in the log file.
For example, this SPOOL log-file CLEAR command clears existing information from the
specified log file and starts logging the session in the log file:
SQL>spool C:\log\persnl_updates.log clear
68 Running Commands Interactively in the Neoview Script Interface