in reply to Re: Connect to DB2 Database with Perl DBI in Windows 7
in thread Connect to DB2 Database with Perl DBI in Windows 7

Thanks for the reply. When installing in CPAN i get the following error: Failed during this command: IBMTORDB2/DBD-DB2-1.85.tar.gz : writemakefile NO 'C:\Strawberry\perl\bin\perl.exe Makefile.PL' returned status 512
  • Comment on Re^2: Connect to DB2 Database with Perl DBI in Windows 7

Replies are listed 'Best First'.
Re^3: Connect to DB2 Database with Perl DBI in Windows 7
by 1nickt (Canon) on Aug 17, 2015 at 20:04 UTC

    See this issue report, which suggests that the problem is because the code doesn't compile with the gcc bundled with Strawberry Perl.

    I believe that the core issue is gcc compiler support under Windows. T +here is a history here... that shows that in 2010, a patch was contributed +for DBD::DB2 1.78 for gcc on Windows. DBD::DB2 1.85, the current versio +n on CPAN, doesn't include this patch (or it no longer works).
    The way forward always starts with a minimal test.
      See this issue report, which suggests that the problem is because the code doesn't compile with the gcc bundled with Strawberry Perl.

      Should all attempts to compile DBD::DB2 fail, consider installing an ODBC driver for DB2 and use DBD::ODBC instead.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      Thanks for all the help everyone. Will research what you've given me thus far and report back with any additional info.
Re^3: Connect to DB2 Database with Perl DBI in Windows 7
by pme (Monsignor) on Aug 17, 2015 at 20:01 UTC
    Can you see this message couple of lines above? "DB2_HOME environment variable must be set to installed location of DB2." This may be the reason. I have never used DB2.
      Yes you are right that is at the top. Does this mean I need to pass a DB2 installed location on my local machine? Would I actually have this by default on Windows?