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

If the (*) is issued in the OBEY command, all files are executed in the current directory. Some
of the files in the directory could be binary files. The OBEY command tries to read those
binary files and junk or invalid characters are displayed on the console. For example, this
command causes invalid characters to be displayed on the console:
SQL> obey C:\nci\bin\*
OBEY detects recursive obey files (for example, an sql file that calls OBEY on itself) and
prevents infinite loops using a max depth environment variable. If no variable is passed to
the JVM, the default depth is set to 10. To change this depth (for example to a value of 20),
pass a Java environment variable as follows:
-Dhpnci.obeydepth=20
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
98 NCI Commands