Neoview Command Interface (NCI) Guide (R2.4)

Examples
This OBEY command runs the script file from the local directory (the same directory where
you are running NCI):
SQL>obey ddl.sql
This OBEY command runs the script file in the specified directory on Windows.
SQL>obey c:\my_files\ddl.sql
This OBEY command runs the script file in the specified directory on a Linux or UNIX
workstation:
SQL>obey ./my_files/ddl.sql
This sample file contains sections to be used in conjunction with the OBEY command:
?section droptable
DROP TABLE COURSE
?section create
CREATE TABLE COURSE
(
CNO VARCHAR(3) NOT NULL,
CNAME VARCHAR(22) NOT NULL,
CDESCP VARCHAR(25) NOT NULL,
CRED INT,
CLABFEE NUMERIC(5,2),
CDEPT VARCHAR(4) NOT NULL,
primary key (cno)
) ;
?section insert
INSERT INTO COURSE VALUES
('C11', 'INTRO TO CS','FOR ROOKIES',3, 100, 'CIS');
INSERT INTO COURSE VALUES
('C22', 'DATA STRUCTURES','VERY USEFUL',3, 50, 'CIS');
INSERT INTO COURSE VALUES
('C33', 'DISCRETE MATHEMATICS',
'ABSOLUTELY NECESSARY',3, 0,'CIS');
?section select
SELECT * FROM course;
?section delete
purgedata course;
To run only the commands in section create, execute the following :
SQL>obey C:\Command Interfaces\course.sql (create)
SQL>?section create
SQL>CREATE TABLE COURSE
+>(
+> CNO VARCHAR(3) NOT NULL,
+> CNAME VARCHAR(22) NOT NULL,
+> CDESCP VARCHAR(25) NOT NULL,
+> CRED INT,
+> CLABFEE NUMERIC(5,2),
+> CDEPT VARCHAR(4) NOT NULL,
+> primary key (cno)
+>) ;
110 NCI Commands