SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
S-63
Example—SQLCI
You can set up your SQLCI session environment by including the
sqlci-command option when you start SQLCI. For example, you might create an
OBEY command file named PROFILE that contains these commands:
VOLUME $VOL1.SALES;
CATALOG SALES;
SET SESSION AUTOWORK OFF, BREAK_KEY OFF;
LOG SQLCILOG;
Then you can prepare your environment quickly by entering the:
SQLCI OBEY PROFILE;
This command starts an SQLCI session, sets the current default volume and
subvolume to $VOL1.SALES, sets the current catalog to SALES, turns off the
AUTOWORK and BREAK_KEY session options, and begins logging session input
and output to the file SQLCILOG.
Example—SQLCI
This is an example of a simple SQLCI session started from a TACL prompt to set up
tables for testing. Commands entered by the user are shown in lowercase.
157>SQLCI
SQL Conversional Interface - T9191D30
COPYRIGHT TANDEM COMPUTERS INCORPORATED 1987-1994
>>volume mycat;
>>create table test1 (a int, b char (3));
--- SQL operation complete.
>>create table test2 (x datetime year to minute,
+> y national character varying (30),
+> z int, primary key z);
--- SQL operation complete.
>>exit
SQLCI Commands
SQLCI commands are free-format: spaces are not significant except within character
strings or numbers. Commands can contain up to 132 characters per line and can be
in uppercase, lowercase, or mixed case.
Each SQLCI command (in addition to each SQL statement entered through SQLCI)
must be terminated by a semicolon. You can include several commands on the same
line as long as each one is terminated by a semicolon.
You can continue any command over multiple lines, breaking that command at any
point except within a word, a numeric literal, or a multicharacter operator (for example,
>=). Except when breaking a string literal, you do not have to enter a continuation
symbol (&).
Table S-2 on page S-64 summarizes the major SQLCI commands. (SQLCI commands
used primarily for report writing are summarized separately in the entry REPORT