I'm getting a function sequence error when executing a perl script I've made to access a DB2 database. My problem determination steps were as follows:
-I cataloged the database and node and set it up correctly.
-I connected to the database with no problem with the CLP and ran a query from the CLP to make sure it would work, it did
-I created my perlscript from others that I used to connect to other databases and just filled in the blanks.
-I double checked the table name to make sure I'm connecting to the correct table as I read in another forum that that was a guys problem.

The perscript connects to the database with no problems, it runs the prepare statement but then craps out on the execute statement. Here is my program without username and password:


$ENV{DB2DIR} ="/usr/IBMdb2/";
$ENV{DB2INSTANCE} ="db2inst1";
$ENV{INSTHOME} ="/home/db2inst1";
$ENV{LD_LIBRARY_PATH} =":home/db2inst1/sqllib/lib";
$ENV{PATH} ="/usr/bin:/usr/sbin:/usr/bin/X11:/sbin:/usr/local/bin:/home/db2inst1/sqllib/bin:/home/db2inst1/sqllib/adm:/home/db2inst1/sqllib/misc";
$ENV{CLASSPATH} =":/home/deb2inst1/sqllib/java/db2java.zip:/home/db2inst1/sqllib/java/runtime.zip:/home/db2inst1/sqllib/java/db2java.zip/home/db2inst1/sqllib/java/runtime.zip:";

use DBI;
use DBD:B2::Constants;
use DBD:B2;
my $dbh = DBI->connect("dbiB2:EUBADB2A", 'username', 'password');

if ( !defined $dbh) {
print "Fatal Error!\nCould not connect to database.\n";
print "Database: EUBADB2A\n";
exit 1;
} else {
print "Successful connection to database: \n";

my $sth = $dbh->prepare("select * from WSDIW.BM01C_CALL_WO_PROD");

#print "hello" while ($sth->fetch)


I'm running the following:
DBI version: 1.30
DB2-DB2 version .76
Redhat 7.2
perl 5.004 (I think?)
I modified the db2cli.ini:

Any ideas?

p.s. I also have a trace if anyone wants one.

-Bill Brooks