NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
L-49
LOG Command
SQL issues a single lock against all rows for an order. (The default LOCKLENGTH
would cause a separate lock for each row in the order.)
CREATE TABLE SALES.ODETAIL (
ORDERNUM NUMERIC (6) UNSIGNED, —Column length
PARTNUM NUMERIC (4) UNSIGNED, 6 bytes
QTY_ORDERED NUMERIC (5),
PRIMARY KEY ( ORDERNUM , PARTNUM ) —Key declaration
)
LOCKLENGTH 6; —Lock length 6 bytes
LOG Command
LOG is an SQLCI command that starts or stops logging to a file. SQLCI logs the
commands you enter and the information the commands display. You can also use an
option to log only the commands. This option allows you to create an SQLCI obey file
from the log file directly. SQLCI does not log the FUP, EDIT, PERUSE, and TEDIT
commands.
log-file
identifies the current log file and starts logging. For log-file, specify a device,
process, or disk file. You cannot log to any current output file (such as the INVOKE
TO, OUT, or OUT_REPORT file) or to any open file other than a terminal or
process. If you specify a nonexistent disk file, an EDIT file is created. When you
enter the LOG command, the previous log file is closed.
To stop logging and close the log file, omit log-file.
COMMANDS
allows SQLCI to log the commands only.
CLEAR
clears the new log file of all existing data before logging begins. If you omit this
option, logging information is appended to the file. CLEAR is ignored unless the
file is a disk or process file.
The following information is written to the log file:
All text that SQLCI displays or prints, including output from commands such as
SHOW, data from SELECT commands, and diagnostic messages.
All lines you type (preceded by the current prompt).
LOG [ log-file [COMMAND[S] ] [ CLEAR ] ] ;