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

6 Running RMXCI from Perl or Python
You can run SQL statements in Perl or Python by invoking the RMXCI Perl or Python wrapper
script. To use the wrapper scripts, see:
“Login environment variables” (page 51)
“Perl and Python wrapper scripts” (page 52)
“Launching RMXCI from the Perl or Python command-line” (page 52)
These instructions assume that you have installed the RMXCI product. For more information, see
Chapter 2 (page 12).
Login environment variables
Before launching RMXCI from Perl or Python, set these login environment variables:
DescriptionEnvironment variable
Specifies the Perl JavaServer JAR file location.RMXCI_PERL_JSERVER=JavaServer_jar_path
Specifies the Jython JAR file location.RMXCI_PYTHON_JSERVER=Jython_jar_path
Specifies the port on which the JavaServer listens.RMXCI_PERL_JSERVER_PORT=port_number
To set the login environment variables, see:
“Setting the login environment variables ” (page 51)
Setting the login environment variables
You can set the login environment variables for the session at command prompts, or you can set
the login environment variables for each user by including the variables in the user profile on client
workstation.
Setting login environment variables on the command-line
At each command prompt in any shell except the C shell, enter one of these commands:
export RMXCI_PERL_JSERVER=absolute-path-of-JavaServer.jar
export RMXCI_PYTHON_JSERVER=absolute-path-of-Jython.jar
export RMXCI_PERL_JSERVER_PORT=portnumber
Setting login environment variables in the user profile
1. In the /home directory, open the user profile (.profile or .bash_profile for the Bash
shell), for example:
/home:vi .profile
2. Add the following export commands (or setenv commands for the C shell) to the user
profile.
export RMXCI_PERL_JSERVER=absolute-path-of-JavaServer.jar
export RMXCI_PYTHON_JSERVER=absolute-path-of-Jython.jar
export RMXCI_PERL_JSERVER_PORT=portnumber
3. To activate the changes, either log out and log in again or run the user profile command, for
example:
/home:. .profile
Login environment variables 51