Discussion:
First time DBI user crashing perl
(too old to reply)
Peter Shabino
2014-10-29 23:44:36 UTC
Permalink
Trying to set up a connection to a remote DB2 server in perl to query some data.
Followed the directions here:
My projects:
http://www.wire2wire.org/
Peter Shabino
2014-10-29 23:50:15 UTC
Permalink
Try this again I apparently found a keyboard shortcut to send the message in hotmail......




Trying to set up a connection to a remote DB2 server in perl to query some data.
Followed the directions here:http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
Then searching the web I came up with this chunk of code:
use warnings;use strict;use DBI;use DBD::DB2;
print("Operating System = ",$^O,"\n");print("Perl Binary = ",$^X,"\n");print("Perl Version = ",$],"\n");print("DBI Version = ",$DBI::VERSION,"\n");print("DBD::DB2 Version = ",$DBD::DB2::VERSION,"\n\n");print("env = ",$ENV{ DB2INSTANCE},"\n");
my @driver_names = DBI->available_drivers;print(join("\n",@driver_names),"\n");
print("I am here\n");
my @dataSources = DBI->data_sources('DB2');print(@dataSources,"\n");
print("I am there\n");
exit(0);
When I run this I get a popup that says the "Perl interpreter has stopped working" and a button to close the program.
on the console I get:Operating System = MSWin32Perl Binary = c:\strawberry\perl\bin\perl.exePerl Version = 5.018001DBI Version = 1.631DBD::DB2 Version = 1.85
env = DB2ADODB2DBMExamplePFileGoferODBCPgProxySQLiteSpongemysqlI am here
So the failure is when I try and get the DB2 data sources...
Just have no idea even where to start looking for the issue since there is no error message. Is there a log file with more information on what might have died?
Thanks,
Peter

My projects:
http://www.wire2wire.org/
Jon
2014-10-30 02:26:15 UTC
Permalink
Hello Peter,

How are you invoking the script? Do you have a perl script that you double
click?

If so, can you try opening a command/powershell window and running your
program? You'll likely have to specify the full path to the perl binary
then pass your script as the first parameter.

E.g.: \strawberry\perl\bin\perl.exe my_script.pl

I have not encountered this particular problem with db2 but this is my
first step when trying to get one of my scripts to run in Windows (I'm a
Linux enginner by the Windows engineers steal a lot of my applications),
perhaps someone has more specific experience than myself.

Best Regards,
Jon A
Post by Peter Shabino
Try this again I apparently found a keyboard shortcut to send the message in hotmail......
Trying to set up a connection to a remote DB2 server in perl to query some data.
http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
use warnings;
use strict;
use DBI;
use DBD::DB2;
print("Operating System = ",$^O,"\n");
print("Perl Binary = ",$^X,"\n");
print("Perl Version = ",$],"\n");
print("DBI Version = ",$DBI::VERSION,"\n");
print("DBD::DB2 Version = ",$DBD::DB2::VERSION,"\n\n");
print("env = ",$ENV{ DB2INSTANCE},"\n");
print("I am here\n");
print("I am there\n");
exit(0);
When I run this I get a popup that says the "Perl interpreter has stopped
working" and a button to close the program.
Operating System = MSWin32
Perl Binary = c:\strawberry\perl\bin\perl.exe
Perl Version = 5.018001
DBI Version = 1.631
DBD::DB2 Version = 1.85
env = DB2
ADO
DB2
DBM
ExampleP
File
Gofer
ODBC
Pg
Proxy
SQLite
Sponge
mysql
I am here
So the failure is when I try and get the DB2 data sources...
Just have no idea even where to start looking for the issue since there is
no error message. Is there a log file with more information on what might
have died?
Thanks,
Peter
http://www.wire2wire.org/
Peter Shabino
2014-10-30 02:42:28 UTC
Permalink
I am running it from a command prompt and I am getting some of the output so perl is running fine. Just looks like any command that trys and uses the DB2 interface causes a crash.
Thanks,
Peter

My projects:
http://www.wire2wire.org/


Date: Wed, 29 Oct 2014 20:26:15 -0600
Subject: RE: First time DBI user crashing perl
From: ***@gmail.com
To: ***@hotmail.com
CC: dbi-***@perl.org

Hello Peter,
How are you invoking the script? Do you have a perl script that you double click?
If so, can you try opening a command/powershell window and running your program? You'll likely have to specify the full path to the perl binary then pass your script as the first parameter.
E.g.: \strawberry\perl\bin\perl.exe my_script.pl
I have not encountered this particular problem with db2 but this is my first step when trying to get one of my scripts to run in Windows (I'm a Linux enginner by the Windows engineers steal a lot of my applications), perhaps someone has more specific experience than myself.
Best Regards,

Jon A
On Oct 29, 2014 5:50 PM, "Peter Shabino" <***@hotmail.com> wrote:



Try this again I apparently found a keyboard shortcut to send the message in hotmail......




Trying to set up a connection to a remote DB2 server in perl to query some data.
Followed the directions here:http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
Then searching the web I came up with this chunk of code:
use warnings;use strict;use DBI;use DBD::DB2;
print("Operating System = ",$^O,"\n");print("Perl Binary = ",$^X,"\n");print("Perl Version = ",$],"\n");print("DBI Version = ",$DBI::VERSION,"\n");print("DBD::DB2 Version = ",$DBD::DB2::VERSION,"\n\n");print("env = ",$ENV{ DB2INSTANCE},"\n");
my @driver_names = DBI->available_drivers;print(join("\n",@driver_names),"\n");
print("I am here\n");
my @dataSources = DBI->data_sources('DB2');print(@dataSources,"\n");
print("I am there\n");
exit(0);
When I run this I get a popup that says the "Perl interpreter has stopped working" and a button to close the program.
on the console I get:Operating System = MSWin32Perl Binary = c:\strawberry\perl\bin\perl.exePerl Version = 5.018001DBI Version = 1.631DBD::DB2 Version = 1.85
env = DB2ADODB2DBMExamplePFileGoferODBCPgProxySQLiteSpongemysqlI am here
So the failure is when I try and get the DB2 data sources...
Just have no idea even where to start looking for the issue since there is no error message. Is there a log file with more information on what might have died?
Thanks,
Peter

My projects:
http://www.wire2wire.org/
Jon
2014-10-30 03:56:27 UTC
Permalink
Hello Peter,

Well, that's kinda what I figured but never hurts try for the easy answer.

I cleaned up your test script a bit.

Can you give this version a try:
https://gist.github.com/three18ti/c37587ef7d5fb9ee5748

I'm downloading DB2 as we speak, but I wanted to ask for your DB2_HOME
environment variable. In your instructions it has you set it, but the
instructions are clearly for a linux server, what did you do on your
windows server?

Honestly, I have very limited DB2 experience, so it's kinda the blind
leading the blind here. I'm really just curious myself. you're more than
welcome to ignore me and wait for one of the more experienced guys :)

Best Regards,
Jon A
Post by Peter Shabino
I am running it from a command prompt and I am getting some of the output
so perl is running fine. Just looks like any command that trys and uses the
DB2 interface causes a crash.
Thanks,
Peter
http://www.wire2wire.org/
------------------------------
Date: Wed, 29 Oct 2014 20:26:15 -0600
Subject: RE: First time DBI user crashing perl
Hello Peter,
How are you invoking the script? Do you have a perl script that you double click?
If so, can you try opening a command/powershell window and running your
program? You'll likely have to specify the full path to the perl binary
then pass your script as the first parameter.
E.g.: \strawberry\perl\bin\perl.exe my_script.pl
I have not encountered this particular problem with db2 but this is my
first step when trying to get one of my scripts to run in Windows (I'm a
Linux enginner by the Windows engineers steal a lot of my applications),
perhaps someone has more specific experience than myself.
Best Regards,
Jon A
Try this again I apparently found a keyboard shortcut to send the message in hotmail......
Trying to set up a connection to a remote DB2 server in perl to query some data.
http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
use warnings;
use strict;
use DBI;
use DBD::DB2;
print("Operating System = ",$^O,"\n");
print("Perl Binary = ",$^X,"\n");
print("Perl Version = ",$],"\n");
print("DBI Version = ",$DBI::VERSION,"\n");
print("DBD::DB2 Version = ",$DBD::DB2::VERSION,"\n\n");
print("env = ",$ENV{ DB2INSTANCE},"\n");
print("I am here\n");
print("I am there\n");
exit(0);
When I run this I get a popup that says the "Perl interpreter has stopped
working" and a button to close the program.
Operating System = MSWin32
Perl Binary = c:\strawberry\perl\bin\perl.exe
Perl Version = 5.018001
DBI Version = 1.631
DBD::DB2 Version = 1.85
env = DB2
ADO
DB2
DBM
ExampleP
File
Gofer
ODBC
Pg
Proxy
SQLite
Sponge
mysql
I am here
So the failure is when I try and get the DB2 data sources...
Just have no idea even where to start looking for the issue since there is
no error message. Is there a log file with more information on what might
have died?
Thanks,
Peter
http://www.wire2wire.org/
Tim Bunce
2014-10-30 12:17:19 UTC
Permalink
Turning on tracing is usually a good idea when odd things are happening.
Read https://metacpan.org/pod/DBI#TRACING
and set the DBI_TRACE environment variable.

Tim.
Post by Jon
Hello Peter,
Well, that's kinda what I figured but never hurts try for the easy answer.
I cleaned up your test script a bit.
Can you give this version a try: [1]https://gist.github.com/three18ti/c37587ef7d5fb9ee5748
I'm downloading DB2 as we speak, but I wanted to ask for your DB2_HOME environment variable. In your
instructions it has you set it, but the instructions are clearly for a linux server, what did you do on
your windows server?
Honestly, I have very limited DB2 experience, so it's kinda the blind leading the blind here. I'm
really just curious myself. you're more than welcome to ignore me and wait for one of the more
experienced guys :)
Best Regards,
Jon A
I am running it from a command prompt and I am getting some of the output so perl is running fine.
Just looks like any command that trys and uses the DB2 interface causes a crash.
Thanks,
Peter
[3]http://www.wire2wire.org/
--------------------------------------------------------------------------------------------------------
Date: Wed, 29 Oct 2014 20:26:15 -0600
Subject: RE: First time DBI user crashing perl
Hello Peter,
How are you invoking the script? Do you have a perl script that you double click?
If so, can you try opening a command/powershell window and running your program? You'll likely have to
specify the full path to the perl binary then pass your script as the first parameter.
E.g.: \strawberry\perl\bin\perl.exe [7]my_script.pl
I have not encountered this particular problem with db2 but this is my first step when trying to get
one of my scripts to run in Windows (I'm a Linux enginner by the Windows engineers steal a lot of my
applications), perhaps someone has more specific experience than myself.
Best Regards,
Jon A
Try this again I apparently found a keyboard shortcut to send the message in hotmail......
Trying to set up a connection to a remote DB2 server in perl to query some data.
[9]http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
use warnings;
use strict;
use DBI;
use DBD::DB2;
print("Operating System = ",$^O,"\n");
print("Perl Binary = ",$^X,"\n");
print("Perl Version = ",$],"\n");
print("DBI Version = ",$DBI::VERSION,"\n");
print("DBD::DB2 Version = ",$DBD::DB2::VERSION,"\n\n");
print("env = ",$ENV{ DB2INSTANCE},"\n");
print("I am here\n");
print("I am there\n");
exit(0);
When I run this I get a popup that says the "Perl interpreter has stopped working" and a button to
close the program.
Operating System = MSWin32
Perl Binary = c:\strawberry\perl\bin\perl.exe
Perl Version = 5.018001
DBI Version = 1.631
DBD::DB2 Version = 1.85
env = DB2
ADO
DB2
DBM
ExampleP
File
Gofer
ODBC
Pg
Proxy
SQLite
Sponge
mysql
I am here
So the failure is when I try and get the DB2 data sources...
Just have no idea even where to start looking for the issue since there is no error message. Is
there a log file with more information on what might have died?
Thanks,
Peter
[10]http://www.wire2wire.org/
References
Visible links
1. https://gist.github.com/three18ti/c37587ef7d5fb9ee5748
3. http://www.wire2wire.org/
7. http://my_script.pl/
9. http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
10. http://www.wire2wire.org/
Peter Shabino
2014-10-30 20:33:05 UTC
Permalink
Here is the environment variables:
env DB2INSTANCE = DB2env DB2LIB = C:/Program Files/IBM/SQLLIB/lib/Win32env LD_LIBRARY_PATH = C:/Program Files/IBM/SQLLIB/lib/Win32env LIBPATH = C:/Program Files/IBM/SQLLIB/lib/Win32
and the output from trace 15
New 'DBI::dr' (for DBD::DB2::dr, parent='', id=undef) dbih_setup_handle(DBI::dr=HASH(0x2e4c7c0)=>DBI::dr=HASH(0x2e4c868), DBD::DB2::dr, 0, Null!) dbih_make_com(Null!, 0, DBD::DB2::dr, 176, 0) thr#98a6f8 dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), Err, Null!) SCALAR(0x2acff18) (already defined) dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), State, Null!) SCALAR(0x2e11358) (already defined) dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), Errstr, Null!) SCALAR(0x2acff60) (already defined) dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), TraceLevel, Null!) 0 (already defined) dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), FetchHashKeyName, Null!) 'NAME' (already defined) <- install_driver= DBI::dr=HASH(0x2e4c7c0) >> data_sources DISPATCH (DBI::dr=HASH(0x2e4c7c0) rc1/3 @1 g3 ima801 pid#9476) at c:/strawberry/perl/site/lib/DBI.pm line 1066 via at db2.pl line 35 !! The warn '0' was CLEARED by call to data_sources method -> data_sources for DBD::DB2::dr (DBI::dr=HASH(0x2e4c7c0)~0x2e4c868) thr#98a6f8
Any clues in there on what I have set up wrong?
Here is my perl versionThis is perl 5, version 18, subversion 1 (v5.18.1) built for MSWin32-x64-multi-thread

Thanks!Peter

My projects:
http://www.wire2wire.org/
Date: Thu, 30 Oct 2014 12:17:19 +0000
Subject: Re: First time DBI user crashing perl
Turning on tracing is usually a good idea when odd things are happening.
Read https://metacpan.org/pod/DBI#TRACING
and set the DBI_TRACE environment variable.
Tim.
Post by Jon
Hello Peter,
Well, that's kinda what I figured but never hurts try for the easy answer.
I cleaned up your test script a bit.
Can you give this version a try: [1]https://gist.github.com/three18ti/c37587ef7d5fb9ee5748
I'm downloading DB2 as we speak, but I wanted to ask for your DB2_HOME environment variable. In your
instructions it has you set it, but the instructions are clearly for a linux server, what did you do on
your windows server?
Honestly, I have very limited DB2 experience, so it's kinda the blind leading the blind here. I'm
really just curious myself. you're more than welcome to ignore me and wait for one of the more
experienced guys :)
Best Regards,
Jon A
I am running it from a command prompt and I am getting some of the output so perl is running fine.
Just looks like any command that trys and uses the DB2 interface causes a crash.
Thanks,
Peter
[3]http://www.wire2wire.org/
--------------------------------------------------------------------------------------------------------
Date: Wed, 29 Oct 2014 20:26:15 -0600
Subject: RE: First time DBI user crashing perl
Hello Peter,
How are you invoking the script? Do you have a perl script that you double click?
If so, can you try opening a command/powershell window and running your program? You'll likely have to
specify the full path to the perl binary then pass your script as the first parameter.
E.g.: \strawberry\perl\bin\perl.exe [7]my_script.pl
I have not encountered this particular problem with db2 but this is my first step when trying to get
one of my scripts to run in Windows (I'm a Linux enginner by the Windows engineers steal a lot of my
applications), perhaps someone has more specific experience than myself.
Best Regards,
Jon A
Try this again I apparently found a keyboard shortcut to send the message in hotmail......
Trying to set up a connection to a remote DB2 server in perl to query some data.
[9]http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
use warnings;
use strict;
use DBI;
use DBD::DB2;
print("Operating System = ",$^O,"\n");
print("Perl Binary = ",$^X,"\n");
print("Perl Version = ",$],"\n");
print("DBI Version = ",$DBI::VERSION,"\n");
print("DBD::DB2 Version = ",$DBD::DB2::VERSION,"\n\n");
print("env = ",$ENV{ DB2INSTANCE},"\n");
print("I am here\n");
print("I am there\n");
exit(0);
When I run this I get a popup that says the "Perl interpreter has stopped working" and a button to
close the program.
Operating System = MSWin32
Perl Binary = c:\strawberry\perl\bin\perl.exe
Perl Version = 5.018001
DBI Version = 1.631
DBD::DB2 Version = 1.85
env = DB2
ADO
DB2
DBM
ExampleP
File
Gofer
ODBC
Pg
Proxy
SQLite
Sponge
mysql
I am here
So the failure is when I try and get the DB2 data sources...
Just have no idea even where to start looking for the issue since there is no error message. Is
there a log file with more information on what might have died?
Thanks,
Peter
[10]http://www.wire2wire.org/
References
Visible links
1. https://gist.github.com/three18ti/c37587ef7d5fb9ee5748
3. http://www.wire2wire.org/
7. http://my_script.pl/
9. http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
10. http://www.wire2wire.org/
Tim Bunce
2014-10-30 21:37:54 UTC
Permalink
Post by Peter Shabino
env DB2INSTANCE = DB2
env DB2LIB = C:/Program Files/IBM/SQLLIB/lib/Win32
env LD_LIBRARY_PATH = C:/Program Files/IBM/SQLLIB/lib/Win32
env LIBPATH = C:/Program Files/IBM/SQLLIB/lib/Win32
and the output from trace 15
New 'DBI::dr' (for DBD::DB2::dr, parent='', id=undef)
dbih_setup_handle(DBI::dr=HASH(0x2e4c7c0)=>DBI::dr=HASH(0x2e4c868), DBD::DB2::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::DB2::dr, 176, 0) thr#98a6f8
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), Err, Null!) SCALAR(0x2acff18) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), State, Null!) SCALAR(0x2e11358) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), Errstr, Null!) SCALAR(0x2acff60) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), TraceLevel, Null!) 0 (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), FetchHashKeyName, Null!) 'NAME' (already defined)
<- install_driver= DBI::dr=HASH(0x2e4c7c0)
c:/strawberry/perl/site/lib/DBI.pm line 1066 via at db2.pl line 35
!! The warn '0' was CLEARED by call to data_sources method
-> data_sources for DBD::DB2::dr (DBI::dr=HASH(0x2e4c7c0)~0x2e4c868) thr#98a6f8
Any clues in there on what I have set up wrong?
Nope. Sure looks like a crash within the DBD::DB2 driver.
Hopefully someone here can help but you could also try
http://www.software.ibm.com/data/db2/perl

Tim.
Post by Peter Shabino
Here is my perl version
This is perl 5, version 18, subversion 1 (v5.18.1) built for MSWin32-x64-multi-thread
Thanks!
Peter
http://www.wire2wire.org/
Date: Thu, 30 Oct 2014 12:17:19 +0000
Subject: Re: First time DBI user crashing perl
Turning on tracing is usually a good idea when odd things are happening.
Read https://metacpan.org/pod/DBI#TRACING
and set the DBI_TRACE environment variable.
Tim.
Post by Jon
Hello Peter,
Well, that's kinda what I figured but never hurts try for the easy answer.
I cleaned up your test script a bit.
Can you give this version a try: [1]https://gist.github.com/three18ti/c37587ef7d5fb9ee5748
I'm downloading DB2 as we speak, but I wanted to ask for your DB2_HOME environment variable. In your
instructions it has you set it, but the instructions are clearly for a linux server, what did you do
on
Post by Jon
your windows server?
Honestly, I have very limited DB2 experience, so it's kinda the blind leading the blind here. I'm
really just curious myself. you're more than welcome to ignore me and wait for one of the more
experienced guys :)
Best Regards,
Jon A
I am running it from a command prompt and I am getting some of the output so perl is running fine.
Just looks like any command that trys and uses the DB2 interface causes a crash.
Thanks,
Peter
[3]http://www.wire2wire.org/
--------------------------------------------------------------------------------------------------------
Post by Jon
Date: Wed, 29 Oct 2014 20:26:15 -0600
Subject: RE: First time DBI user crashing perl
Hello Peter,
How are you invoking the script? Do you have a perl script that you double click?
If so, can you try opening a command/powershell window and running your program? You'll likely have
to
Post by Jon
specify the full path to the perl binary then pass your script as the first parameter.
E.g.: \strawberry\perl\bin\perl.exe [7]my_script.pl
I have not encountered this particular problem with db2 but this is my first step when trying to get
one of my scripts to run in Windows (I'm a Linux enginner by the Windows engineers steal a lot of my
applications), perhaps someone has more specific experience than myself.
Best Regards,
Jon A
Try this again I apparently found a keyboard shortcut to send the message in hotmail......
Trying to set up a connection to a remote DB2 server in perl to query some data.
[9]http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
use warnings;
use strict;
use DBI;
use DBD::DB2;
print("Operating System = ",$^O,"\n");
print("Perl Binary = ",$^X,"\n");
print("Perl Version = ",$],"\n");
print("DBI Version = ",$DBI::VERSION,"\n");
print("DBD::DB2 Version = ",$DBD::DB2::VERSION,"\n\n");
print("env = ",$ENV{ DB2INSTANCE},"\n");
print("I am here\n");
print("I am there\n");
exit(0);
When I run this I get a popup that says the "Perl interpreter has stopped working" and a button to
close the program.
Operating System = MSWin32
Perl Binary = c:\strawberry\perl\bin\perl.exe
Perl Version = 5.018001
DBI Version = 1.631
DBD::DB2 Version = 1.85
env = DB2
ADO
DB2
DBM
ExampleP
File
Gofer
ODBC
Pg
Proxy
SQLite
Sponge
mysql
I am here
So the failure is when I try and get the DB2 data sources...
Just have no idea even where to start looking for the issue since there is no error message. Is
there a log file with more information on what might have died?
Thanks,
Peter
[10]http://www.wire2wire.org/
References
Visible links
1. https://gist.github.com/three18ti/c37587ef7d5fb9ee5748
3. http://www.wire2wire.org/
7. http://my_script.pl/
9. http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
10. http://www.wire2wire.org/
Furst, Carl
2014-10-30 21:44:48 UTC
Permalink
Is the driver you are using the one you used to install the DBD libs with?

If you installed the DBD libs with one driver and then, say, upgraded the
driver, you would have to re-install the DBD libs.


Carl Furst
Post by Tim Bunce
Post by Peter Shabino
env DB2INSTANCE = DB2
env DB2LIB = C:/Program Files/IBM/SQLLIB/lib/Win32
env LD_LIBRARY_PATH = C:/Program Files/IBM/SQLLIB/lib/Win32
env LIBPATH = C:/Program Files/IBM/SQLLIB/lib/Win32
and the output from trace 15
New 'DBI::dr' (for DBD::DB2::dr, parent='', id=undef)
dbih_setup_handle(DBI::dr=HASH(0x2e4c7c0)=>DBI::dr=HASH(0x2e4c868), DBD::DB2::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::DB2::dr, 176, 0) thr#98a6f8
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), Err, Null!)
SCALAR(0x2acff18) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), State, Null!)
SCALAR(0x2e11358) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), Errstr, Null!)
SCALAR(0x2acff60) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), TraceLevel, Null!) 0 (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), FetchHashKeyName,
Null!) 'NAME' (already defined)
<- install_driver= DBI::dr=HASH(0x2e4c7c0)
ima801 pid#9476) at
c:/strawberry/perl/site/lib/DBI.pm line 1066 via at db2.pl line 35
!! The warn '0' was CLEARED by call to data_sources method
-> data_sources for DBD::DB2::dr
(DBI::dr=HASH(0x2e4c7c0)~0x2e4c868) thr#98a6f8
Any clues in there on what I have set up wrong?
Nope. Sure looks like a crash within the DBD::DB2 driver.
Hopefully someone here can help but you could also try
http://www.software.ibm.com/data/db2/perl
Tim.
Post by Peter Shabino
Here is my perl version
This is perl 5, version 18, subversion 1 (v5.18.1) built for MSWin32-x64-multi-thread
Thanks!
Peter
http://www.wire2wire.org/
Date: Thu, 30 Oct 2014 12:17:19 +0000
Subject: Re: First time DBI user crashing perl
Turning on tracing is usually a good idea when odd things are
happening.
Read https://metacpan.org/pod/DBI#TRACING
and set the DBI_TRACE environment variable.
Tim.
Post by Jon
Hello Peter,
Well, that's kinda what I figured but never hurts try for the
easy answer.
Post by Jon
I cleaned up your test script a bit.
[1]https://gist.github.com/three18ti/c37587ef7d5fb9ee5748
Post by Jon
I'm downloading DB2 as we speak, but I wanted to ask for your
DB2_HOME environment variable. In your
Post by Jon
instructions it has you set it, but the instructions are clearly
for a linux server, what did you do
on
Post by Jon
your windows server?
Honestly, I have very limited DB2 experience, so it's kinda the
blind leading the blind here. I'm
Post by Jon
really just curious myself. you're more than welcome to ignore
me and wait for one of the more
Post by Jon
experienced guys :)
Best Regards,
Jon A
On Wed, Oct 29, 2014 at 8:42 PM, Peter Shabino
I am running it from a command prompt and I am getting some of
the output so perl is running fine.
Post by Jon
Just looks like any command that trys and uses the DB2 interface
causes a crash.
Post by Jon
Thanks,
Peter
[3]http://www.wire2wire.org/
-------------------------------------------------------------------------
-------------------------------
Post by Jon
Date: Wed, 29 Oct 2014 20:26:15 -0600
Subject: RE: First time DBI user crashing perl
Hello Peter,
How are you invoking the script? Do you have a perl script that
you double click?
Post by Jon
If so, can you try opening a command/powershell window and
running your program? You'll likely have
to
Post by Jon
specify the full path to the perl binary then pass your script
as the first parameter.
Post by Jon
E.g.: \strawberry\perl\bin\perl.exe [7]my_script.pl
I have not encountered this particular problem with db2 but this
is my first step when trying to get
Post by Jon
one of my scripts to run in Windows (I'm a Linux enginner by the
Windows engineers steal a lot of my
Post by Jon
applications), perhaps someone has more specific experience than
myself.
Post by Jon
Best Regards,
Jon A
Try this again I apparently found a keyboard shortcut to send
the message in hotmail......
Post by Jon
Trying to set up a connection to a remote DB2 server in perl to
query some data.
[9]http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
Post by Jon
use warnings;
use strict;
use DBI;
use DBD::DB2;
print("Operating System = ",$^O,"\n");
print("Perl Binary = ",$^X,"\n");
print("Perl Version = ",$],"\n");
print("DBI Version = ",$DBI::VERSION,"\n");
print("DBD::DB2 Version = ",$DBD::DB2::VERSION,"\n\n");
print("env = ",$ENV{ DB2INSTANCE},"\n");
print("I am here\n");
print("I am there\n");
exit(0);
When I run this I get a popup that says the "Perl interpreter
has stopped working" and a button to
Post by Jon
close the program.
Operating System = MSWin32
Perl Binary = c:\strawberry\perl\bin\perl.exe
Perl Version = 5.018001
DBI Version = 1.631
DBD::DB2 Version = 1.85
env = DB2
ADO
DB2
DBM
ExampleP
File
Gofer
ODBC
Pg
Proxy
SQLite
Sponge
mysql
I am here
So the failure is when I try and get the DB2 data sources...
Just have no idea even where to start looking for the issue
since there is no error message. Is
Post by Jon
there a log file with more information on what might have died?
Thanks,
Peter
[10]http://www.wire2wire.org/
References
Visible links
1. https://gist.github.com/three18ti/c37587ef7d5fb9ee5748
3. http://www.wire2wire.org/
7. http://my_script.pl/
9.
http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
Post by Jon
10. http://www.wire2wire.org/
**********************************************************

MLB.com: Where Baseball is Always
Bruce Johnson
2014-10-30 22:08:55 UTC
Permalink
Post by Furst, Carl
Is the driver you are using the one you used to install the DBD libs with?
If you installed the DBD libs with one driver and then, say, upgraded the
driver, you would have to re-install the DBD libs.
Also, I don’t know about DB2, and less about Strawberry perl :-/ but I do know a very common issue with is bitness mismatch in the database vendor drivers; 32-bit database driver vs 64-bit perl and vice versa, although there are usually install time errors that will signal this.
--
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs
Peter Shabino
2014-10-30 22:41:48 UTC
Permalink
Yea have seen the bitness issue mentioned a bunch. Been very careful to select the 64 bit version of everything. Only questionable items are DBI (cpan DBI) and DBD::DB2 (cpan DBD::DB2) Is there some special flag I need to set or different package name for the 64 bit versions of those 2?
Have another note types up with everything I just did (full uninstall and reinstall) and the new error I hit.
Thanks,Peter

My projects:
http://www.wire2wire.org/
Subject: Re: First time DBI user crashing perl
Date: Thu, 30 Oct 2014 22:08:55 +0000
Post by Furst, Carl
Is the driver you are using the one you used to install the DBD libs with?
If you installed the DBD libs with one driver and then, say, upgraded the
driver, you would have to re-install the DBD libs.
Also, I don’t know about DB2, and less about Strawberry perl :-/ but I do know a very common issue with is bitness mismatch in the database vendor drivers; 32-bit database driver vs 64-bit perl and vice versa, although there are usually install time errors that will signal this.
--
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group
Institutions do not have opinions, merely customs
Peter Shabino
2014-10-30 22:42:20 UTC
Permalink
Started over uninstalling everything.
Installed the following:strawberry-perl-5.20.1.1-64bit.msiibm_data_server_driver_package_win64_v10.5.execpan DBI
at this point everything has installed with no errors. Update my environment vars to point at the data server libraries:set DB2_HOME=C:\PROGRA~1\IBM\IBMDAT~1set DB2LIB=C:\PROGRA~1\IBM\IBMDAT~1\LIB
then rancpan DBD::DB2

This now fails with the following error:CPAN: CPAN::SQLite loaded ok (v0.204)Database was generated on Thu, 30 Oct 2014 22:29:21 GMT
Running install for module 'DBD::DB2'CPAN: Digest::SHA loaded ok (v5.92)CPAN: Compress::Zlib loaded ok (v2.064)Checksum for C:\STRAWB~1\cpan\sources\authors\id\I\IB\IBMTORDB2\DBD-DB2-1.85.tar.gz okCPAN: Archive::Tar loaded ok (v2.02)CPAN: File::Temp loaded ok (v0.2304)CPAN: YAML::XS loaded ok (v0.52)CPAN: Parse::CPAN::Meta loaded ok (v1.4414)CPAN: CPAN::Meta loaded ok (v2.142060)Configuring I/IB/IBMTORDB2/DBD-DB2-1.85.tar.gz with Makefile.PL
Configuring DBD::DB2...Remember to actually read the README and CAVEATS files!
Using DB2 in "C:/PROGRA~1/IBM/IBMDAT~1"System: perl5.020001 DBI1.631 Win32 strawberry-perl 5.20.1.1 #1 Mon Sep 15 13:26:45 2014 x64 MSWin32-x64-multi-thread dl_win32.xsCompiler: gcc -s -O2 -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfieldsIncludes: -I"C:/PROGRA~1/IBM/IBMDAT~1/include" -I"C:\STRAWB~1\perl\site\lib/auto/DBI" -I"C:\STRAWB~1\perl\lib/auto/DBI" -I"C:\STRAWB~1\perl\vendor\lib/auto/DBI" -I"C:\STRAWB~1\perl\site\lib/auto/DBI" Libraries: -L"C:\PROGRA~1\IBM\IBMDAT~1\LIB" db2cli.lib db2api.lib -L"C:/PROGRA~1/IBM/IBMDAT~1/LIB"
Checking if your kit is complete...Looks goodWarning (mostly harmless): No library found for db2api.libChecking if your kit is complete...Looks goodGenerating a dmake-style MakefileWriting Makefile for DBD::DB2::ConstantsWriting MYMETA.yml and MYMETA.jsonGenerating a dmake-style MakefileWriting Makefile for DBD::DB2Writing MYMETA.yml and MYMETA.json IBMTORDB2/DBD-DB2-1.85.tar.gz C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OKRunning make for I/IB/IBMTORDB2/DBD-DB2-1.85.tar.gzCPAN: Module::CoreList loaded ok (v5.20140914)cp DB2.pod blib\lib\DBD\DB2.podcp DB2.pm blib\lib\DBD\DB2.pmcp lib/Bundle/DBD/DB2.pm blib\lib\Bundle\DBD\DB2.pmcp Constants.pm ..\blib\lib\DBD\DB2\Constants.pmAutoSplitting ..\blib\lib\DBD\DB2\Constants.pm (..\blib\lib\auto\DBD\DB2\Constants)Running Mkbootstrap for DBD::DB2::Constants ()C:\Strawberry\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 Constants.bsC:\Strawberry\perl\bin\perl.exe C:\Strawberry\perl\lib\ExtUtils\xsubpp -typemap C:\STRAWB~1\perl\lib\ExtUtils\typemap Constants.xs > Constants.xsc && C:\Strawberry\perl\bin\perl.exe -MExtUtils::Command -e mv -- Constants.xsc Constants.cgcc -c -I"C:/PROGRA~1/IBM/IBMDAT~1/include" -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"1.85\" -DXS_VERSION=\"1.85\" "-IC:\STRAWB~1\perl\lib\CORE" Constants.cIn file included from C:/PROGRA~1/IBM/IBMDAT~1/include/sqlcli.h:983:0, from Constants.xs:16:C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1747:5: error: unknown type name '__in_ecount' __in_ecount(cchConnStrIn) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1750:5: error: unknown type name '__out_ecount_opt' __out_ecount_opt(cchConnStrOutMax) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1753:5: error: unknown type name '__out_opt' __out_opt ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1864:5: error: unknown type name '__in_ecount' __in_ecount(cchConnStrIn) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1867:5: error: unknown type name '__out_ecount_opt' __out_ecount_opt(cchConnStrOutMax) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1870:5: error: unknown type name '__out_opt' __out_opt ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1890:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchCatalogName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1893:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchSchemaName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1896:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchTableName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1899:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchColumnName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1906:5: error: unknown type name '__out_opt' __out_opt ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1908:5: error: unknown type name '__out_opt' __out_opt ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1910:5: error: unknown type name '__out_opt' __out_opt ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1912:5: error: unknown type name '__out_opt' __out_opt ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1919:5: error: unknown type name '__out_opt' __out_opt ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1921:5: error: unknown type name '__out_opt' __out_opt ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1926:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchPkCatalogName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1929:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchPkSchemaName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1932:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchPkTableName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1935:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchFkCatalogName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1938:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchFkSchemaName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1941:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchFkTableName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1951:5: error: unknown type name '__in_ecount' __in_ecount(cchSqlStrIn) SQLCHAR* szSqlStrIn, ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1953:5: error: unknown type name '__out_ecount_opt' __out_ecount_opt(cchSqlStrMax) SQLCHAR* szSqlStr, ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1960:5: error: unknown type name '__out_opt' __out_opt ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1970:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchCatalogName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1973:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchSchemaName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1976:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchTableName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1982:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchCatalogName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1985:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchSchemaName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1988:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchProcName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1991:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchColumnName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1997:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchCatalogName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2000:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchSchemaName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2003:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchProcName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2017:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchCatalogName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2020:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchSchemaName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2023:5: error: unknown type name '__in_ecount_opt' __in_ecount_opt(cchTableName) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2030:5: error: unknown type name '__out_ecount_opt' __out_ecount_opt(cchDriverDescMax) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2033:5: error: unknown type name '__out_opt' __out_opt ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2035:5: error: unknown type name '__out_ecount_opt' __out_ecount_opt(cchDrvrAttrMax) ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2038:5: error: unknown type name '__out_opt' __out_opt ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2086:5: error: unknown type name '__out' __out ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2127:5: error: unknown type name '__in_opt' __in_opt LPWSTR szFileName, ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2128:5: error: unknown type name '__out_bcount_opt' __out_bcount_opt(cbOutputMsg) LPWSTR lpwszOutputMsg, ^C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:2129:5: error: unknown type name '__in' __in DWORD cbOutputMsg ^dmake: Error code 129, while making 'Constants.o'dmake.exe: Error code 255, while making 'subdirs' IBMTORDB2/DBD-DB2-1.85.tar.gz C:\STRAWB~1\c\bin\dmake.exe -- NOT OKStopping: 'install' failed for 'DBD::DB2'.

Any ideas where I went wrong?

Thanks,
Peter

My projects:
http://www.wire2wire.org/
Subject: Re: First time DBI user crashing perl
Date: Thu, 30 Oct 2014 21:44:48 +0000
Is the driver you are using the one you used to install the DBD libs with?
If you installed the DBD libs with one driver and then, say, upgraded the
driver, you would have to re-install the DBD libs.
Carl Furst
Post by Tim Bunce
Post by Peter Shabino
env DB2INSTANCE = DB2
env DB2LIB = C:/Program Files/IBM/SQLLIB/lib/Win32
env LD_LIBRARY_PATH = C:/Program Files/IBM/SQLLIB/lib/Win32
env LIBPATH = C:/Program Files/IBM/SQLLIB/lib/Win32
and the output from trace 15
New 'DBI::dr' (for DBD::DB2::dr, parent='', id=undef)
dbih_setup_handle(DBI::dr=HASH(0x2e4c7c0)=>DBI::dr=HASH(0x2e4c868),
DBD::DB2::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::DB2::dr, 176, 0) thr#98a6f8
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), Err, Null!)
SCALAR(0x2acff18) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), State, Null!)
SCALAR(0x2e11358) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), Errstr, Null!)
SCALAR(0x2acff60) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), TraceLevel, Null!) 0
(already defined)
dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), FetchHashKeyName,
Null!) 'NAME' (already defined)
<- install_driver= DBI::dr=HASH(0x2e4c7c0)
ima801 pid#9476) at
c:/strawberry/perl/site/lib/DBI.pm line 1066 via at db2.pl line 35
!! The warn '0' was CLEARED by call to data_sources method
-> data_sources for DBD::DB2::dr
(DBI::dr=HASH(0x2e4c7c0)~0x2e4c868) thr#98a6f8
Any clues in there on what I have set up wrong?
Nope. Sure looks like a crash within the DBD::DB2 driver.
Hopefully someone here can help but you could also try
http://www.software.ibm.com/data/db2/perl
Tim.
Post by Peter Shabino
Here is my perl version
This is perl 5, version 18, subversion 1 (v5.18.1) built for
MSWin32-x64-multi-thread
Thanks!
Peter
http://www.wire2wire.org/
Date: Thu, 30 Oct 2014 12:17:19 +0000
Subject: Re: First time DBI user crashing perl
Turning on tracing is usually a good idea when odd things are
happening.
Read https://metacpan.org/pod/DBI#TRACING
and set the DBI_TRACE environment variable.
Tim.
Post by Jon
Hello Peter,
Well, that's kinda what I figured but never hurts try for the
easy answer.
Post by Jon
I cleaned up your test script a bit.
[1]https://gist.github.com/three18ti/c37587ef7d5fb9ee5748
Post by Jon
I'm downloading DB2 as we speak, but I wanted to ask for your
DB2_HOME environment variable. In your
Post by Jon
instructions it has you set it, but the instructions are clearly
for a linux server, what did you do
on
Post by Jon
your windows server?
Honestly, I have very limited DB2 experience, so it's kinda the
blind leading the blind here. I'm
Post by Jon
really just curious myself. you're more than welcome to ignore
me and wait for one of the more
Post by Jon
experienced guys :)
Best Regards,
Jon A
On Wed, Oct 29, 2014 at 8:42 PM, Peter Shabino
I am running it from a command prompt and I am getting some of
the output so perl is running fine.
Post by Jon
Just looks like any command that trys and uses the DB2 interface
causes a crash.
Post by Jon
Thanks,
Peter
[3]http://www.wire2wire.org/
-------------------------------------------------------------------------
-------------------------------
Post by Jon
Date: Wed, 29 Oct 2014 20:26:15 -0600
Subject: RE: First time DBI user crashing perl
Hello Peter,
How are you invoking the script? Do you have a perl script that
you double click?
Post by Jon
If so, can you try opening a command/powershell window and
running your program? You'll likely have
to
Post by Jon
specify the full path to the perl binary then pass your script
as the first parameter.
Post by Jon
E.g.: \strawberry\perl\bin\perl.exe [7]my_script.pl
I have not encountered this particular problem with db2 but this
is my first step when trying to get
Post by Jon
one of my scripts to run in Windows (I'm a Linux enginner by the
Windows engineers steal a lot of my
Post by Jon
applications), perhaps someone has more specific experience than
myself.
Post by Jon
Best Regards,
Jon A
Try this again I apparently found a keyboard shortcut to send
the message in hotmail......
Post by Jon
Trying to set up a connection to a remote DB2 server in perl to
query some data.
[9]http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
Post by Jon
use warnings;
use strict;
use DBI;
use DBD::DB2;
print("Operating System = ",$^O,"\n");
print("Perl Binary = ",$^X,"\n");
print("Perl Version = ",$],"\n");
print("DBI Version = ",$DBI::VERSION,"\n");
print("DBD::DB2 Version = ",$DBD::DB2::VERSION,"\n\n");
print("env = ",$ENV{ DB2INSTANCE},"\n");
print("I am here\n");
print("I am there\n");
exit(0);
When I run this I get a popup that says the "Perl interpreter
has stopped working" and a button to
Post by Jon
close the program.
Operating System = MSWin32
Perl Binary = c:\strawberry\perl\bin\perl.exe
Perl Version = 5.018001
DBI Version = 1.631
DBD::DB2 Version = 1.85
env = DB2
ADO
DB2
DBM
ExampleP
File
Gofer
ODBC
Pg
Proxy
SQLite
Sponge
mysql
I am here
So the failure is when I try and get the DB2 data sources...
Just have no idea even where to start looking for the issue
since there is no error message. Is
Post by Jon
there a log file with more information on what might have died?
Thanks,
Peter
[10]http://www.wire2wire.org/
References
Visible links
1. https://gist.github.com/three18ti/c37587ef7d5fb9ee5748
3. http://www.wire2wire.org/
7. http://my_script.pl/
9.
http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
Post by Jon
10. http://www.wire2wire.org/
**********************************************************
MLB.com: Where Baseball is Always On
Bruce Johnson
2014-10-30 23:04:19 UTC
Permalink
Post by Peter Shabino
IC:\STRAWB~1\perl\lib\CORE" Constants.c
In file included from C:/PROGRA~1/IBM/IBMDAT~1/include/sqlcli.h:983:0,
C:/PROGRA~1/IBM/IBMDAT~1/include/sqlext.h:1747:5: error: unknown type name '__in_ecount'
__in_ecount(cchConnStrIn)
This really sounds as though an include or header file or two is missing.

Again, I’m not a DB2 guru, but I do know you’ll get errors like this with Oracle if certain Oracle header files are missing; with oracle’s instant client, for example, you have to install an additional SDK package to get the various files needed to compile applications as well as the basic client to successfully install DBD::Oracle.
--
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs
Continue reading on narkive:
Loading...