SQL/MX 2.x Reference Manual (H06.04+)

MXCI Commands
HP NonStop SQL/MX Reference Manual540440-003
4-41
OBEY Command
OBEY Command
Considerations for OBEY
Examples of OBEY
The OBEY command executes MXCI commands and SQL statements from a file
exactly as if you had entered the commands and statements from within an MXCI
session.
You can use OBEY only within an MXCI session.
command-file
is the path name of a file that contains MXCI commands and SQL statements to be
executed by the OBEY command.
command-file must be an OSS text file (an odd-unstructured file, type 180) or a
file specified with a Guardian path name that is an EDIT file (type 101). The file is
sometimes referred to as an OBEY command file.
An OBEY command file must either be closed at the time you execute OBEY or
open for read only. OBEY opens the file if necessary, executes the commands and
statements, and then closes the file.
section-name
is the name of a section within command-file to execute.
If you specify section-name, OBEY executes the commands between the
header line for the specified section and the header line for the following section
(or the end of the file).
If you omit section-name, OBEY executes the entire file.
Considerations for OBEY
Specifying Sections in Command Files
Specify sections within a command file by including a section header that starts in
column 1 at the beginning of each section:
?SECTION section-name
The section-name is a regular SQL identifier that is the name of the section. It
cannot begin with a number or underscore. Each section name should be unique within
its file, because MXCI executes only the first section it finds that has the name you
specify in an OBEY command.
OBEY command-file [(section-name)]