HP (Hewlett-Packard) 544530-001 Computer Accessories User Manual


 
6 Running Neoview Script From Perl or Python
You can execute an SQL statement in Perl or Python by invoking the Neoview Script Perl or
Python wrapper script. To use the Perl or Python wrapper script, see:
“Setting the Login Environment Variables” (page 71)
“Perl and Python Wrapper Scripts” (page 74)
“Launching Neoview Script From the Perl or Python Command Line” (page 74)
“Launching Neoview Script From a Perl or Python Program” (page 76)
These instructions assume that you installed the Neoview Script product. For more information,
see Chapter 2 (page 23).
NOTE: Neoview Script provides a beta version of enhanced support for Perl and Python
programs. This functionality enables multiple SQL statements to run in one database connection
from a Perl or Python program. For more information, see the README in the Neoview Script
samples directory.
Setting the Login Environment Variables
Before launching Neoview Script from Perl or Python, set these login environment variables:
DescriptionEnvironment Variable
Specifies the host name or IP address of the database
platform to which you want the client to connect. The
host-name should include the domain name of the
database platform if it is different from the domain of the
client workstation. If you do not specify a port number,
Neoview Script uses the default port number, which is
18650.
HPNVS_SERVER=host-name[:port-number]
HPNVS_SERVER=IP-address[:port-number]
Specifies the user name to log in to the database platform.
HPNVS_USER=user-name
Specifies the password of the user to log in to the database
platform.
HPNVS_PASSWORD=password
Specifies the name of a data source.
HPNVS_DATASOURCE=data-source-name
If you do not set these environment variables, Neoview Script prompts you to enter the host
name, user name, and password each time you invoke Neoview Script on the Perl or Python
command line. Invoking Neoview Script from within a Perl or Python program requires you to
set these login environment variables.
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 71)
“Setting the Login Environment Variables on Linux or UNIX” (page 73)
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 HPNVS_SERVER=host-name:port-number
set HPNVS_USER=user-name
Setting the Login Environment Variables 71