Neoview Command Interface (NCI) Guide (R2.5)
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 HPNCI_PERL_JSERVER=absolute-path-of-JavaServer.jarexport HPNCI_PYTHON_JSERVER=absolute-path-of-Jython.jar
export HPNCI_PERL_JSERVER_PORT=portnumber
At each command prompt in the C shell, enter one of these commands:
setenv HPNCI_PERL_SERVER=absolute-path-of-JavaServer.jar
setenv HPNCI_PYTHON_JSERVER=absolute-path-of-Jython.jar
setenv HPNCI_PERL_JSERVER_PORT=portnumber
Setting Login Environment Variables in the User Profile
To set the login environment variables in the user profile:
1. Open the user profile (.profile or .bash_profile for the Bash shell) in the /home
directory. For example:
vi .profile
2. Add these export commands (or setenv commands for the C shell) to the user profile.
For example:
export HPNCI_PERL_JSERVER=absolute-path-of-JavaServer.jar
export HPNCI_PYTHON_JSERVER=absolute-path-of-Jython.jar
export HPNCI_PERL_JSERVER_PORT=portnumber
3. To activate the changes, either log out and log in again or execute the user profile. For
example:
. .profile
Perl and Python Wrapper Scripts
The Perl or Python wrapper scripts enable you to run SQL statements and script files using a
single connection or multiple connections within Perl or Python programs. The Perl wrapper
script is hpnci.pl, and the Python wrapper script is hpnci.py. By default, these wrapper
scripts are located in the NCI bin directory:
• On Windows:
hpnci-installation-directory\Neoview Command Interface\bin
hpnci-installation-directory is the directory where you installed the NCI software
files.
• On Linux or UNIX:
hpnci-installation-directory/nci/bin
hpnci-installation-directory is the directory where you installed the NCI software
files.
Launching NCI From the Perl or Python Command Line
You can launch the Perl or Python wrapper scripts as shown below:
• Perl Wrapper Script:
perl hpnci.pl perl-script-filename
To run a Perl program, enter the perl command at a command prompt. For example:
>perl hpnci.pl example.pl
• Python Wrapper Script:
python hpnci.py python-script-filename
To run a Python program, enter the python command at a command prompt. For example:
>python hpnci.py example.py
68 Running NCI From Perl or Python