SQL/MX Remote Conversational Interface (RMXCI) Guide for SQL/MX Release 3.1 (H06.23+, J06.12+)

Considerations
You must enter the command in one line.
Put a space between obey and the first character of the filename.
You can run this command in a script file.
Before putting dependent SQL statements across multiple files, consider the order of the file
execution. If a directory is not passed to the obey command, the file or wildcard is assumed
to be in the current directory.
If the (*) is issued in the obey command, all files are run in the current directory. Some of
the files in the directory might be binary files. The obey command tries to read those binary
files and junk or invalid characters are displayed on the console. For example, the following
command causes invalid characters to be displayed on the console:
SQL> obey /usr/home/rmxci/bin/*
The command detects recursive obey files (for example, a sql file that obeys itself) and prevents
infinite loops using a maximum 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), set
the java environment variable as follows:
-Drmxci.obeydepth=20
Examples
The following command runs the script file from the local directory :
SQL>obey ddl.sql
The following command runs the script file in the specified directory on a client workstation:
SQL>obey ./my_files/ddl.sql
The following 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
OBEY command 75