Neoview Command Interface (NCI) Guide (R2.5)
Examples
• This command changes the NCI session to WMS mode operation:
SQL>mode wms
WMS>
• This command returns the NCI session to SQL mode operation:
WMS>mode sql
SQL>
• The .WMS prefix before the WMS command, INFO WMS, allows you to run that WMS
command in SQL mode:
SQL>.wms info wms;
OBEY Command
The OBEY command executes the SQL statements and NCI commands of a specified script file
or an entire directory. This command accepts a single filename or a filename with a wild-card
pattern specified. Executing the OBEY command without optional parameters prompts you to
enter a filename. If a filename is not specified, then *.sql is used.
Syntax
OBEY {script-file | wild-card-pattern} [(section-name)]
script-file
is the name of an ASCII text file that contains SQL statements, NCI commands, and comments.
If the script file exists outside the local directory where you launch NCI (by default, the NCI
bin directory), specify the full directory path of the script file.
wild-card-pattern
is a character string used to search for script files with names that match the character string.
wild-card-pattern matches a string, depending on the operating system for
case-sensitivity, unless you enclose it within double quotes. To look for similar values, specify
only part of the characters of wild-card-pattern combined with these wild-card characters:
Use an asterisk (*) to indicate zero or more characters of any type. For example, *art* matches SMART,
ARTIFICIAL, and PARTICULAR.
*
Use a question mark (?) to indicate any single character. For example, boo? matches BOOK and BOOT
but not BOO or BOOTS.
?
(section-name)
is the name of a section within the script-file to execute. If you specify section-name,
the OBEY command executes the commands between the header line for the specified section
and the header line for the next section (or the end of the script file). If you omit
section-name, the OBEY command executes the entire script file. For more information,
see “Section Headers” (page 62).
Considerations
• You must enter the command on one line. The command does not require an SQL terminator.
• Put a space between OBEY and the first character of the file name.
• You can execute 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 wild card is
assumed to be in the current working directory.
OBEY Command 97