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

import os
import sys
## Modify this path
sys.path.append("/usr/home/rmxci/lib/python")
import Session
# create a session object
sess = Session.Session()
# Connect to the database
x=sess.__connect__("super.services","password",
"nsksys.ind.hp.com",
"18650","TDM_Default_DataSource")
# Execute sample queries
# __execute takes the query string as parameter
setSchema = "set schema RMXCI.RMXCI_SAMPLE";
selectTable = "select * from employee"
getStats = "get statistics"
#Contruct a list of SQL statements to be executed
queryList = [setSchema, selectTable, getStats]
print "\n";
for query in queryList:
print sess.__execute__(query)
# disconnect the session
sess.__disconnect__()
del sess
sess=None
Launching RMXCI from the Perl or Python command-line 53