Neoview Command Interface (NCI) Guide (R2.3)

export HPNCI_PASSWORD=password
export HPNCI_DATASOURCE=data-source-name
At each command prompt in the C shell, enter one of these commands:
setenv HPNCI_SERVER=host-name:port-number
setenv HPNCI_USER=user-name
setenv HPNCI_PASSWORD=password
setenv HPNCI_DATASOURCE=data-source-name
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_SERVER=host-name:port-number
export HPNCI_USER=user-name
export HPNCI_PASSWORD=password
export HPNCI_DATASOURCE=data-source-name
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 script enables you to invoke NCI from Perl or Python to execute an
SQL statement. The Perl wrapper script is hpnci.pl, and the Python wrapper script is hpnci.py.
By default, these wrapper scripts are located in the Neoview Command Interfacebin directory:
On Windows:
hpnci-installation-directory\Neoview Command Interface\bin
hpnci-installation-directory is the directory where you installed the NCI software
files. For more information, see Table 2-1 (page 41).
On Linux or UNIX:
hpnci-installation-directory/nci/bin
hpnci-installation-directory is the directory where you installed the NCI software
files. For more information, see Table 2-1 (page 41).
To use the Perl and Python wrapper scripts, see:
“Launching NCI From the Perl or Python Command Line” (page 84)
“Launching NCI From a Perl or Python Program” (page 86)
Launching NCI From the Perl or Python Command Line
You can run an SQL statement by invoking the NCI Perl or Python wrapper script on the Perl
or Python command line:
Perl Wrapper Script:
perl hpnci.pl "sql-statement-string"
Python Wrapper Script:
python hpnci.py "sql-statement-string"
84 Running NCI From Perl or Python