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

5 Running scripts in RMXCI
In RMXCI, you can perform the following tasks with script files:
“Creating a script file” (page 48)
“Running a script file” (page 49)
“Logging output” (page 50)
“Running scripts in parallel” (page 50)
Creating a script file
A script file which you run in RMXCI must be an ASCII text file, which contains only the following
elements:
“Supported SQL statements in script files” (page 48)
“Permitted RMXCI commands in script files” (page 48)
“Comments” (page 48)
“Section headers” (page 48)
For an example, see “Example of a script file” (page 49).
NOTE: You cannot use shell commands in a script file that you run in RMXCI. To create shell
scripts that can be run from RMXCI, see Chapter 6 (page 51).
Supported SQL statements in script files
For the details about the supported SQL statements in the script files, see Appendix B (page 119).
Permitted RMXCI commands in script files
Most of the RMXCI commands are supported in script file, with a few exceptions. For a list of
interface commands, see Appendix A (page 54).
Disallowed interface commands in script files
The fc command cannot be run in script files.
Comments
You can include comments anywhere in a script file. SQL also supports comments. Comments are
useful for documenting the functionality of the script file and for debugging. When debugging,
use comments to disable specific statements or commands without removing them from the script
file.
To denote a comment in a script file, use two hyphens before the comment:
-- comment
The end of the line marks the end of the comment.
Section headers
To create sections of commands within a script file, put a section header at the beginning of each
section:
?SECTION section-name
The section-name cannot begin with a number or an underscore. Each section name in a script
file must be unique because RMXCI runs the first section that it finds that matches the section name
48 Running scripts in RMXCI