Neoview Command Interface (NCI) Guide (R2.4)
6 Running NCI From Perl or Python
You can execute SQL statements in Perl or Python by invoking the NCI Perl or Python wrapper
script. To use the Perl or Python wrapper script, see:
• “Setting the Login Environment Variables” (page 79)
• “Perl and Python Wrapper Scripts” (page 82)
• “Launching NCI From the Perl or Python Command Line” (page 82)
These instructions assume that you installed the Neoview Command Interface product. For more
information, see Chapter 2 (page 21).
Setting the Login Environment Variables
Before launching NCI from Perl or Python, set these login environment variables:
DescriptionEnvironment Variable
Specifies the Perl JavaServer JAR location.
HPNCI_PERL_JSERVER=JavaServer_jar_path
Specifies the Jython JAR file location.
HPNCI_PYTHON_JSERVER=Jython_jar_path
Specifies the port on which the JavaServer is listening.
HPNCI_PERL_JSERVER_PORT=port_number
The NCI Installation Wizard can attempt to automatically download and install both the Perl
JavaServer and Jython open source extensions. If you wish to download and install them manually,
refer to the instructions in the README in the samples directory.
To set the login environment variables, see the instructions for the operating system of the client
workstation:
• “Setting the Login Environment Variables on Windows” (page 79)
• “Setting the Login Environment Variables on Linux or UNIX” (page 81)
NOTE: The Perl and Python wrapper scripts do not require these environment variables:
• HPNCI_SERVER
• HPNCI_USER
• HPNCI_PASSWORD
• HPNCI DATASOURCE
Setting the Login Environment Variables on Windows
You can set the login environment variables for the session at command prompts, or you can set
the login environment variables for the system or user by including them in the System Properties.
Setting Login Environment Variables on the Command Line
At each command prompt, enter one of these commands:
set HPNCI_PERL_JSERVER=absolute-path-of-JavaServer.jar
set HPNCI_PYTHON_JSERVER=absolute-path-of-Jython.jar
set HPNCI_PERL_JSERVER_PORT=portnumber
Setting the Login Environment Variables 79