[EMAIL PROTECTED] wrote:
> Hi all,

Hello,

> I have this script that am trying to use to connect to DB2.
> 
> At the moment I cannot get the script to connect to DB2.
> 
> In the UNIX prompt, if I run . /home/db2inst1/sqllib/db2profile first and then
> run the Perl script, then I can connect to DB2.
> 
> Also, I can only do export DB2INSTANCE=db2inst1 and then run the Perl script,
> then I can connect to DB2.
> 
> Can someone please advise how do I do an export DB2INSTANCE=db2inst1 or run 
> the
> . /home/db2inst1/sqllib/db2profile and that does not work? I tried to include
> the following lines within the Perl script and it does not work too ...

Inside your Perl program do this:

BEGIN {
    $ENV{ DB2INSTANCE } = 'db2inst1';
    }



John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to