SQL/MX Remote Conversational Interface (RMXCI) Guide for SQL/MX Release 3.2 (H06.25+, J06.14+)
SQL>create trigger handlecheckout
+> after insert on checkout
+> referencing new as newr
+> for each row
+> update member set dues = dues + 10
+> where memberid = newr.memberid;
+> /
For the syntax of the create trigger statement, see the SQL/MX Release 3.x Reference Manual.
Logging output
To log a RMXCI session, use the spool or log command. These commands record into a log file
the commands that you enter in the RMXCI interface and the output of those commands.
• “Starting the logging process” (page 66)
• “Stopping the logging process” (page 67)
• “Viewing the contents of a log file” (page 67)
Starting the logging process
Run one of the following commands:
• spool on or log on
• spool log-file or log log-file
For more information, see the “LOG command” (page 94) and the “SPOOL command” (page 138).
SPOOL ON or LOG ON command
The spool on or log on command logs information about a session in the sqlspool.lst
file, which RMXCI stores in the installation directory.
On Linux platform, the sqlspool.lst file is created in directory, from which you are running
rmxci.sh. On Windows platform, the sqlspool.lst file is created in the directory, from which
you are running rmxci.cmd.
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, which you specify. If you specify a directory for the log file, the directory must exist, else,
an error is returned. If you do not specify a directory for the log file, the spool is written to the
directory from where you are running rmxci.sh on Linux and the directory from where you are
running rmxci.cmd on Windows.
For example, on Linux, this command starts logging the session in the persnl_updates.log
file in the /home/usr/log directory:
SQL>spool /home/usr/log/persnl_updates.log
On Windows, the following command starts logging the session in the persnl_updates.log
file in the C:\log directory:
SQL>spool C:\log\persnl_updates.log
66 Interactively running commands in RMXCI










