SQL/MX Remote Conversational Interface (RMXCI) Guide for SQL/MX Release 3.2 (H06.25+, J06.14+)
5 Running scripts in RMXCI
In RMXCI, you can perform the following tasks with script files:
• “Creating a script file” (page 69)
• “Running a script file” (page 70)
• “Logging output” (page 71)
• “Running scripts in parallel” (page 71)
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 69)
• “Permitted RMXCI commands in script files” (page 69)
• “Comments” (page 69)
• “Section headers” (page 69)
For an example, see “Example of a script file” (page 70).
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 72).
Supported SQL statements in script files
For the details about the supported SQL statements in the script files, see Appendix B (page 142).
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 76).
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
Creating a script file 69










