DBD::Informix $SIG{ALRM} /etc/services

2006-11-03 Thread Jay Hannah
Weird. My alarm(2) takes 14 seconds? Is DBD::Informix or something else
overriding my $SIG{ALRM}?

If I substitute the connect() call with a sleep 10, then my alarm(2)
takes 2 seconds, as I expected. :)

Thanks,

j



$ cat j.t
use strict;
use DBI;
my $dbh;
eval {
   local $SIG{ALRM} = sub { die timeout\n };
   alarm(2); # seconds before time out
   $dbh = DBI-connect('dbi:Informix:[EMAIL PROTECTED]');
   alarm(0); # cancel alarm (if connect worked fast)
};
alarm(0);# cancel alarm (if eval failed)
chomp $@;
print [EMAIL PROTECTED]::err][$DBI::errstr]\n;

$ time perl j.t
[timeout][-931][SQL: -931: Cannot locate drprod_tcp service/tcp service
in /etc/services.]

real0m14.320s
user0m0.319s
sys 0m0.044s



$ perl -MDBI -e 'DBI-installed_versions'
  Perl: 5.008004(i686-linux)
  OS  : linux   (2.6.4-52-smp)
  DBI : 1.46
  DBD::Sybase : 1.04
  DBD::Sponge : 11.10
  DBD::Proxy  : install_driver(Proxy) failed: Can't locate
RPC/PlClient.pm in @INC
  DBD::Informix   : 2003.04
  DBD::File   : 0.31
  DBD::ExampleP   : 11.12
  DBD::DBM: 0.02



RE: DBD::Informix $SIG{ALRM} /etc/services

2006-11-03 Thread Jay Hannah

Oops. I noticed my versions were behind. I upgraded DBI and
DBD::Informix.

I'm still getting the same behavior (14.3 seconds to time out), so I'm
still curious about what might be going on. 

Thanks,

j



$ perl -MDBI -e'DBI-installed_versions'
  Perl: 5.008004(i686-linux)
  OS  : linux   (2.6.4-52-smp)
  DBI : 1.53
  DBD::Sybase : 1.04
  DBD::Sponge : 11.10
  DBD::Proxy  : install_driver(Proxy) failed: Can't locate
RPC/PlClient.pm in @INC
  DBD::Informix   : 2005.02
  DBD::File   : 0.35
  DBD::ExampleP   : 11.12
  DBD::DBM: 0.03



RE: :Sybase success, build errors

2005-08-10 Thread Jay Hannah
 I did get quite a few build errors though, and only half of 
 them (or so) are listed in 
 
   DBD-Sybase-1.06/README.freetds
 
 so I thought I'd post my build dialogue here. I'm ignoring 
 all the errors below unless someone slaps me.

Looks like last year I threatened to attempt to patch the tests so they'd run 
clean under freetds. I never did it. Now, feeling shamed, I've given exec.t a 
shot.

On my box (

  Perl: 5.008007(i686-linux)
  OS  : linux   (2.4.21-243-default)
  DBI : 1.48
  DBD::Sybase : 1.06
  freetds v0.63 
 (./configure --prefix=/usr/local/freetds --with-tdsver=7.0)

)

The below modified exec.t runs like so:

$ perl exec.t
1..41
ok 1 - use DBI;
ok 2 - use DBD::Sybase;
ok 3 - Connect
ok 4 - Prepare sp_helpindex
ok 5 - exec sysusers
ok 6 - -1 (create proc)
ok 7 - prepare dbitest
ok 8 - bind_param 1
ok 9 - bind_param 2
cs_convert failed (to_numeric(3.2)) at exec.t line 63.
ok 10 - bind_param 3
ok 11 - bind_param 4
ok 12 - bind_param 5
ok 13 # skip freetds seg faults here
ok 14 # skip freetds doesn't support placeholders
ok 15 # skip freetds doesn't support placeholders
ok 16 # skip freetds doesn't support $sth-func?
ok 17 # skip freetds doesn't support $sth-func?
ok 18 # skip freetds doesn't support placeholders
ok 19 # skip freetds doesn't support placeholders
ok 20 # skip freetds doesn't support placeholders
ok 21 # skip freetds doesn't support placeholders
ok 22 # skip freetds doesn't support placeholders
ok 23 # skip freetds doesn't support placeholders
ok 24 - drop proc dbitest 1
ok 25 - drop proc dbitest 2
ok 26 - -1 (create proc)
ok 27 # skip freetds doesn't support bind_param nor placeholders
ok 28 # skip freetds doesn't support bind_param nor placeholders
ok 29 # skip freetds doesn't support bind_param nor placeholders
ok 30 # skip freetds doesn't support bind_param nor placeholders
ok 31 # skip freetds doesn't support bind_param nor placeholders
ok 32 # skip freetds doesn't support bind_param nor placeholders
ok 33 # skip freetds doesn't support bind_param nor placeholders
ok 34 # skip freetds doesn't support bind_param nor placeholders
ok 35 # skip freetds doesn't support bind_param nor placeholders
ok 36 # skip freetds doesn't support bind_param nor placeholders
ok 37 # skip freetds doesn't support bind_param nor placeholders
ok 38 # skip freetds doesn't support bind_param nor placeholders
ok 39 # skip freetds doesn't support bind_param nor placeholders
ok 40 # skip freetds doesn't support bind_param nor placeholders
ok 41 - drop proc dbitest

I hope this diff format works for you and my patch is good. That diff command 
came from the perl5-porters FAQ, so I hope its what you want.

I hope this helps. If it does I can take a stab at the other test files too.

Cheers,

j



diff -ruN exec.t.original exec.t

--- exec.t.original 2005-08-10 09:25:52.0 -0500
+++ exec.t  2005-08-10 10:09:33.0 -0500
@@ -11,7 +11,7 @@
 use strict;
 
 #use Test::More qw(no_plan);
-use Test::More tests = 22;
+use Test::More tests = 41;
 
 
 BEGIN { use_ok('DBI', ':sql_types');
@@ -20,6 +20,7 @@
 
 use vars qw($Pwd $Uid $Srv $Db);
 
+my $using_freetds = ($ENV{SYBASE} =~ /freetds/i) ? 1 : 0;
 
 #DBI-trace(3);
 
@@ -31,13 +32,11 @@
 ok(defined($dbh), 'Connect');
 
 $SIG{__WARN__} = sub { print @_; };
-my $sth = $dbh-prepare(exec sp_helpindex [EMAIL PROTECTED] = ?);
+my $sth = $dbh-prepare(exec sp_helpindex [EMAIL PROTECTED] = 'sysusers');   
# Placeholders not supported in freetds
 ok(defined($sth), 'Prepare sp_helpindex');
 
 my $rc;
-
-$rc = $sth-execute(sysusers);
-
+$rc = $sth-execute();
 ok(defined($rc), exec sysusers);
 
 get_all_results($sth);
@@ -45,38 +44,45 @@
 #$dbh-do(use tempdb);
 $dbh-do(set arithabort off);
 $dbh-do(if object_id('dbitest') != NULL drop proc dbitest);
-$rc = $dbh-do(qq{
-create proc dbitest [EMAIL PROTECTED] varchar(20), [EMAIL PROTECTED] int, 
[EMAIL PROTECTED] numeric(5,2), [EMAIL PROTECTED] smalldatetime, [EMAIL 
PROTECTED] float output
+$rc = $dbh-do(q{
+create proc dbitest @one varchar(20), @two int, @three numeric(5,2), @four 
smalldatetime, @five float output
 as
-select [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL 
PROTECTED]
+select @one, @two, @three, @four
 select * from master..sysprocesses
 
-return [EMAIL PROTECTED]
+return @two
 });
 
-ok(defined($rc), $rc (create proc)\n);
+ok(defined($rc), $rc (create proc));
 
 $sth = $dbh-prepare(exec dbitest [EMAIL PROTECTED] = ?, [EMAIL PROTECTED] = 
?, [EMAIL PROTECTED] = ?, [EMAIL PROTECTED] = ?, [EMAIL PROTECTED] = ? output);
 #$rc = $sth-execute(one, 2, 3.2, jan 1 2001, 5.4);
 ok(defined($sth), prepare dbitest);
-$sth-bind_param(1, one);
-$sth-bind_param(2, 2, SQL_INTEGER);
-$sth-bind_param(3, 3.2, SQL_DECIMAL);
-$sth-bind_param(4, jan 1 2001);
-$sth-bind_param(5, 5.4, SQL_FLOAT);
-$rc = $sth-execute();
-ok(defined($rc), execute dbitest 1);
-#DBI-trace(4);
-get_all_results($sth);
+ok($sth-bind_param(1, 

RE: :Sybase success, build errors

2005-08-10 Thread Jay Hannah
 diff -ruN exec.t.original exec.t

Hmm... The patch was longer than the file. 

If you prefer, here's the full contents of the modified file.

j



#!perl
#
# $Id: exec.t,v 1.8 2005/06/27 18:04:18 mpeppler Exp $

use lib 'blib/lib';
use lib 'blib/arch';

use lib 't';
use _test;

use strict;

#use Test::More qw(no_plan);
use Test::More tests = 41;


BEGIN { use_ok('DBI', ':sql_types');
use_ok('DBD::Sybase');}


use vars qw($Pwd $Uid $Srv $Db);

my $using_freetds = ($ENV{SYBASE} =~ /freetds/i) ? 1 : 0;

#DBI-trace(3);

($Uid, $Pwd, $Srv, $Db) = _test::get_info();

#DBI-trace(3);
my $dbh = DBI-connect(dbi:Sybase:server=$Srv;database=$Db, $Uid, $Pwd, 
{PrintError=1});
#exit;
ok(defined($dbh), 'Connect');

$SIG{__WARN__} = sub { print @_; };
my $sth = $dbh-prepare(exec sp_helpindex [EMAIL PROTECTED] = 'sysusers');   
# Placeholders not supported in freetds
ok(defined($sth), 'Prepare sp_helpindex');

my $rc;
$rc = $sth-execute();
ok(defined($rc), exec sysusers);

get_all_results($sth);

#$dbh-do(use tempdb);
$dbh-do(set arithabort off);
$dbh-do(if object_id('dbitest') != NULL drop proc dbitest);
$rc = $dbh-do(q{
create proc dbitest @one varchar(20), @two int, @three numeric(5,2), @four 
smalldatetime, @five float output
as
select @one, @two, @three, @four
select * from master..sysprocesses

return @two
});

ok(defined($rc), $rc (create proc));

$sth = $dbh-prepare(exec dbitest [EMAIL PROTECTED] = ?, [EMAIL PROTECTED] = 
?, [EMAIL PROTECTED] = ?, [EMAIL PROTECTED] = ?, [EMAIL PROTECTED] = ? output);
#$rc = $sth-execute(one, 2, 3.2, jan 1 2001, 5.4);
ok(defined($sth), prepare dbitest);
ok($sth-bind_param(1, one),   bind_param 1);
ok($sth-bind_param(2, 2, SQL_INTEGER),  bind_param 2);
ok($sth-bind_param(3, 3.2, SQL_DECIMAL),bind_param 3);
ok($sth-bind_param(4, jan 1 2001),bind_param 4);
ok($sth-bind_param(5, 5.4, SQL_FLOAT),  bind_param 5);
SKIP: {
  skip freetds seg faults here, 1 if $using_freetds;
  ok($rc = $sth-execute(), execute dbitest 1);
}

SKIP: {
  skip freetds doesn't support placeholders, 2 if $using_freetds;
  #DBI-trace(4);
  get_all_results($sth);
  ok($rc = $sth-execute(one, 25, 333.2, jan 1 2001, 5.4),  exec dbitest 
2);
  get_all_results($sth);
  ok($rc = $sth-execute(undef, 25, 3.2234, jan 3 2001, 5.4), exec dbitest 
3);
}

SKIP: {
  skip freetds doesn't support \$sth-func?, 2 if $using_freetds;
  ok(my @out = $sth-func('syb_output_params'), '$sth-func');
  is($out[0], 5.4,  out param 1);
}


#print @out\n;
#do {
#local $^W = 0;
#while(my $d = $sth-fetch) {
#   print @$d\n;
#}
#} while($sth-{syb_more_results});

# test various failure modes:

$sth-{syb_do_proc_status} = 1;
$dbh-{syb_flush_finish} = 0;

SKIP: {
  skip freetds doesn't support placeholders, 6 if $using_freetds;
  ok($rc = $sth-execute(undef, 0, 3.2234, jan 3 2001, 5.4),   execute fail 
mode 1);
  get_all_results($sth);
  #DBI-trace(3);
  ok($rc = $sth-execute(raise, 1, 3.2234, jan 3 2001, 5.4), execute fail 
mode 2);
  get_all_results($sth);
  ok($rc = $sth-execute(undef, 0, 3.2234, jan 3 2001, 5.4),   execute fail 
mode 3);
  #DBI-trace(0);
  get_all_results($sth);

  $dbh-{syb_flush_finish} = 1;
  ok($rc = $sth-execute(undef, 0, 3.2234, jan 3 2001, 5.4),   execute fail 
mode 4);
  get_all_results($sth);
  #DBI-trace(3);
  ok($rc = $sth-execute(undef, 1, 3.2234, jan 3 2001, 5.4),   execute fail 
mode 5);
  get_all_results($sth);
  #DBI-trace(0);
  ok($rc = $sth-execute(undef, 0, 3.2234, jan 3 2001, 5.4),   execute fail 
mode 6);
  get_all_results($sth);
}


ok($dbh-do(drop proc dbitest),  drop proc 
dbitest 1);
ok($dbh-do(if object_id('dbitest') != NULL drop proc dbitest),  drop proc 
dbitest 2);
$rc = $dbh-do(q{
create proc dbitest @one varchar(20), @two int, @three numeric(5,2), @four 
smalldatetime --, @five float = null output
as
select @one, @two, @three, @four

});

ok(defined($rc), $rc (create proc));

SKIP: {
  skip freetds doesn't support bind_param nor placeholders, 7 if 
$using_freetds;
  ok($sth = $dbh-prepare(exec dbitest ?, ?, ?, ?),  prepare);
  ok($sth-bind_param(1, 'String 1', SQL_VARCHAR), bind_param 1);
  ok($sth-bind_param(2, 1, SQL_INTEGER),  bind_param 2);
  ok($sth-bind_param(3, 3.25, SQL_DECIMAL),   bind_param 3);
  ok($sth-bind_param(4, '2005-06-27', SQL_DATETIME),  bind param 4);

  for (0 .. 1) {
$sth-execute('String 1', 1, 3.25, '2005-06-27');
while(my $row = $sth-fetch) {
  ok($row-[2] == 3.25, Implicit finish handling);
}
  }
}

SKIP: {
  skip freetds doesn't support bind_param nor placeholders, 7 if 
$using_freetds;
  $dbh-{syb_do_proc_status} = 1;
  ok($sth = $dbh-prepare(exec dbitest ?, ?, ?, ?),  prepare);
  ok($sth-bind_param(1, 'String 1', SQL_VARCHAR), bind_param 1);
  ok($sth-bind_param(2, 1, SQL_INTEGER),  bind_param 2);
  ok($sth-bind_param(3, 3.25, 

RE: :Sybase success, build errors

2005-08-10 Thread Jay Hannah

The subject of those last 2 emails I sent (and this one) should have been

   DBD::Sybase success, build errors

I don't know how I hosed that. I'll make sure it's correct on any followup.

My apologies,

j



DBD::Sybase success, build errors

2005-08-09 Thread Jay Hannah

The good news is with:

  Perl: 5.008007(i686-linux)
  OS  : linux   (2.4.21-243-default)
  DBI : 1.48
  DBD::Sybase : 1.06
  freetds v0.63 
 (./configure --prefix=/usr/local/freetds --with-tdsver=7.0)
  
I can connect to and query the following MS-SQL servers:

  Microsoft SQL Server  7.00 - 7.00.961 (Intel X86)
  Standard Edition on Windows NT 4.0 (Build 1381: Service Pack 6)

  Microsoft SQL Server  2000 - 8.00.534 (Intel X86)
  Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)

  Microsoft SQL Server  2000 - 8.00.760 (Intel X86)
  Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 2)

  Microsoft SQL Server  2000 - 8.00.760 (Intel X86)
  Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 3)

  Microsoft SQL Server  2000 - 8.00.760 (Intel X86)
  Standard Edition on Windows NT 5.2 (Build 3790: )

  Microsoft SQL Server  2000 - 8.00.760 (Intel X86)
  Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

So everything looks like its working fine.

I did get quite a few build errors though, and only half of them (or so) are 
listed in 

  DBD-Sybase-1.06/README.freetds

so I thought I'd post my build dialogue here. I'm ignoring all the errors below 
unless someone slaps me.

Cheers,

j



---
force install DBD::Sybase

Removing previously used /root/.cpan/build/DBD-Sybase-1.06

  CPAN.pm: Going to build M/ME/MEWP/DBD-Sybase-1.06.tar.gz

Unknown Client Library version - assuming FreeTDS.

By default DBD::Sybase 1.05 and later use the 'CHAINED' mode (where available)
when 'AutoCommit' is turned off. Versions 1.04 and older instead managed
the transactions explicitly with a 'BEGIN TRAN' before the first DML
statement. Using the 'CHAINED' mode is preferable as it is the way that
Sybase implements AutoCommit handling for both its ODBC and JDBC drivers.

Use 'CHAINED' mode by default (Y/N) [Y]: Y

The DBD::Sybase module need access to a Sybase server to run the tests.
To clear an entry please enter 'undef'
Sybase server to use (default: SYBASE): omares-pms
User ID to log in to Sybase (default: sa):
Password (default: undef): Sybase database to use on omares-pms (default: 
undef): hotel

* Writing login information, including password, to file PWD.

Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lcs
Note (probably harmless): No library found for -lsybtcl
Note (probably harmless): No library found for -lcomn
Note (probably harmless): No library found for -lintl
Note (probably harmless): No library found for -lblk
Using DBI 1.48 (for perl 5.008007 on i686-linux) installed in 
/usr/local/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBI/
Writing Makefile for DBD::Sybase
cp dbd-sybase.pod blib/lib/DBD/dbd-sybase.pod
cp Sybase.pm blib/lib/DBD/Sybase.pm
/usr/local/bin/perl5.8.7 -p -e s/~DRIVER~/Sybase/g 
/usr/local/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBI//Driver.xst  
Sybase.xsi
/usr/local/bin/perl5.8.7 /usr/local/lib/perl5/5.8.7/ExtUtils/xsubpp  -typemap 
/usr/local/lib/perl5/5.8.7/ExtUtils/typemap  Sybase.xs  Sybase.xsc  mv 
Sybase.xsc Sybase.c
cc -c  -I/usr/local/freetds/include 
-I/usr/local/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBI -fno-strict-aliasing 
-pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   
-DVERSION=\1.06\ -DXS_VERSION=\1.06\ -fpic 
-I/usr/local/lib/perl5/5.8.7/i686-linux/CORE   Sybase.c
cc -c  -I/usr/local/freetds/include 
-I/usr/local/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBI -fno-strict-aliasing 
-pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   
-DVERSION=\1.06\ -DXS_VERSION=\1.06\ -fpic 
-I/usr/local/lib/perl5/5.8.7/i686-linux/CORE   dbdimp.c
Running Mkbootstrap for DBD::Sybase ()
chmod 644 Sybase.bs
rm -f blib/arch/auto/DBD/Sybase/Sybase.so
LD_RUN_PATH=/usr/local/freetds/lib cc  -L/usr/local/freetds/lib -shared 
-L/usr/local/lib Sybase.o dbdimp.o  -o blib/arch/auto/DBD/Sybase/Sybase.so   
-L/usr/local/freetds/lib -lct -ltds -ldl -lm
chmod 755 blib/arch/auto/DBD/Sybase/Sybase.so
cp Sybase.bs blib/arch/auto/DBD/Sybase/Sybase.bs
chmod 644 blib/arch/auto/DBD/Sybase/Sybase.bs
Manifying blib/man3/DBD::Sybase.3
  /usr/bin/make  -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl5.8.7 -MExtUtils::Command::MM -e 
test_harness(0, 'blib/lib', 'blib/arch') t/*.t
t/autocommitok
t/base..ok
t/exec..NOK 5
# Failed test (t/exec.t at line 41)
t/exec..dubious
Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 5, 8-22
Failed 16/22 tests, 27.27% okay
t/fail..NOK 4
# Failed test (t/fail.t at line 35)
t/fail..NOK 6
# Failed test (t/fail.t at line 47)
ct_send(CS_DESCRIBE_INPUT) returned 0 at blib/lib/DBD/Sybase.pm line 133.
t/fail..dubious
Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 4, 6-12
Failed 8/12 tests, 33.33% okay
t/login.ok
t/main..ok 

RE: DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL,dbd_db_login/SQLSetConnectOption err=-2

2005-06-08 Thread Jay Hannah
  Not us. We use DBD::Sybase and FreeTDS to connect to MS-SQL from Linux.

 Could you give me a pointer on how to set this up?
 I did a couple of tests the other day but I couldn't make it work.

Maybe our Intranet document will help you? I attached it. If not, I'll need a 
lot more info about what errors you're seeing.

Cheers,

j



RE: DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL, dbd_db_login/SQLSetConnectOption err=-2

2005-06-07 Thread Jay Hannah

 Has anyone made this work?

Not us. We use DBD::Sybase and FreeTDS to connect to MS-SQL from Linux.

j



RE: DBD::Informix on 64 bit AIX: can't install

2005-02-04 Thread Jay Hannah
 
 Thanks for using the error reporting mechanism supplied with
 DBD::Informix (or providing the equivalent information); it makes it
 so much easier to help you when the necessary information is all
 available.

:) Hey, I'm very willing to do whatever I can do to help you help me. -grin-

  Do I need to manually build a 64-bit Perl on this AIX box? 
  Will that offset the problem?
 
 Either that or get a 32-bit (9.53.UCx) version of ESQL/C (2.81.UCx
 version of ClientSDK).

Turns out this box had 2 perls on it: 32-bit and 64-bit. 

Using the 64-bit perl, DBD::Informix installed just fine. THANKS!

 If you note the options to the C compiler, they include: -q32
 
 This, I'm pretty sure, tries to compile stuff in 32-bit mode, rather
 than 64-bit mode.  And you can't mix 32-bit objects with 64-bit
 objects -- hence the error.

Roger. Looks like I'm a pretty good guesser!

 I note that the Perl you have installed has both threads and
 multiplicity -- you may want to specify
 DBD_INFORMIX_ESQLC_LINKAGE=-shared -thread in the environment to
 pick up the ESQL/C thread-safe shared libraries.  I'm not sure whether
 multiplicity has an effect on DBI or DBD::Informix -- I think it's
 something to do with being able to have multiple Perl interpreters
 loaded into a single executable.

I'm up and running now, so I'm hesitant to fiddle with things. Would -shared 
-thread be a performance boost? A significant one? (I suppose that would 
depend on what I'm doing?)

Thanks!

j





DBD::Informix on 64 bit AIX: can't install

2005-02-03 Thread Jay Hannah

Do I need to manually build a 64-bit Perl on this AIX box? Will that offset the 
problem?

Thanks,

j

Installing DBD::Informix...
# perl Makefile.PL
*** ExtUtils::AutoInstall version 0.61
*** Checking for dependencies...
[Core Features]
- DBI ...loaded. (1.47 = 1.33)
[High Resolution Timing]
- Time::HiRes ...loaded. (1.66)
*** ExtUtils::AutoInstall configuration finished.
Subroutine main::WriteMakefile redefined at 
/usr/opt/perl5/lib/site_perl/5.8.2/ExtUtils/AutoInstall.pm line 487.

Configuring IBM Informix Database Driver for Perl Version 2003.04 (2003-03-05) 
(aka DBD::Informix)
You are using DBI version 1.47 and Perl version 5.008002
Remember to actually read the README file!

Perl: perl5.008002 aix-thread-multi dl_aix.xs
System:   aix perlfly 2 5 000ad7df4c00 
Compiler: cc_r -O -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES 
-qlonglong
Loader:   ld

Using IBM Informix CSDK Version 2.81, IBM Informix-ESQL Version 9.53.FC2 from 
/usr/informix/prod

Beware: DBD::Informix is not yet aware of all the new IUS data types.

Assert macro will be disabled!

lib/DBD/Informix/Defaults.pm written OK
esqlvrsn.h written OK
esqlinfo.h written OK

Testing whether your Informix test environment will work...
ld: 0711-738 ERROR: Input file esqltest.o:
XCOFF32 object files are not allowed in 64-bit mode.
Failed to link test program esqltest




# perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
  Platform:
osname=aix, osvers=5.2.0.0, archname=aix-thread-multi
uname='aix perlfly 2 5 000ad7df4c00 '
config_args=''
hint=previous, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='cc_r', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE 
-qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 
-D_LARGE_FILES -qlonglong',
optimize='-O',
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -D_ALL_SOURCE 
-D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias 
-DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong 
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias 
-DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong 
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias 
-DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong 
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias 
-DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong 
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias 
-DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong 
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias 
-DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_!
 LARGE_FILES -qlonglong'
ccversion='', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
alignbytes=8, prototype=define
  Linker and Libraries:
ld='ld', ldflags =' -brtl -b32 -bmaxdata:0x8000'
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lbind -lnsl -ldbm -ldl -lld -lm -lpthreads -lc_r -lcrypt -lbsd -lPW
perllibs=-lbind -lnsl -ldl -lld -lm -lpthreads -lc_r -lcrypt -lbsd -lPW
libc=/lib/libc.a, so=a, useshrplib=true, libperl=libperl.a
gnulibc_version=''
  Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, 
ccdlflags='-bE:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp 
-bE:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp 
-bE:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp 
-bE:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp'
cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp 
-bE:$(BASEEXT).exp -bnoentry -lpthreads -lc_r'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES 
PERL_IMPLICIT_CONTEXT
  Built under aix
  Compiled at Feb 13 2004 13:18:17
  @INC:
/usr/opt/perl5/lib/5.8.2/aix-thread-multi
/usr/opt/perl5/lib/5.8.2
/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi
/usr/opt/perl5/lib/site_perl/5.8.2
/usr/opt/perl5/lib/site_perl
.




DBD::Sybase test errors (freetds-0.62.4)

2004-11-29 Thread Jay Hannah

It looks like DBD::Sybase is still working (after forcing the install), but I 
thought I'd report these test failures. Seeing 86.84% okay is pretty scary. 
-grin-

Thanks!

j


freetds-0.62.4

# perl -MDBI -e 'DBI-installed_versions'
  Perl: 5.008004(i686-linux)
  OS  : linux   (2.4.21-215-default)
  DBI : 1.46
  DBD::Sybase : 1.04
  -snipped for relevancy-



---
TEST ERRORS...
-

cpan force install DBD::Sybase
Running install for module DBD::Sybase
Running make for M/ME/MEWP/DBD-Sybase-1.04.tar.gz
Checksum for 
/var/cache/cpan/sources/authors/id/M/ME/MEWP/DBD-Sybase-1.04.tar.gz ok
DBD-Sybase-1.04/
DBD-Sybase-1.04/t/
DBD-Sybase-1.04/t/login.t
DBD-Sybase-1.04/t/autocommit.t
DBD-Sybase-1.04/t/exec.t
DBD-Sybase-1.04/t/place.t
DBD-Sybase-1.04/t/nsql.t
DBD-Sybase-1.04/t/screen.jpg
DBD-Sybase-1.04/t/main.t
DBD-Sybase-1.04/t/xblob.t
DBD-Sybase-1.04/t/_test.pm
DBD-Sybase-1.04/t/fail.t
DBD-Sybase-1.04/t/thread.t
DBD-Sybase-1.04/t/base.t
DBD-Sybase-1.04/README.freetds
DBD-Sybase-1.04/Sybase.h
DBD-Sybase-1.04/MANIFEST
DBD-Sybase-1.04/eg/
DBD-Sybase-1.04/eg/Show.cgi
DBD-Sybase-1.04/eg/dbschema.pl
DBD-Sybase-1.04/eg/check-space.pl
DBD-Sybase-1.04/eg/README
DBD-Sybase-1.04/dbdimp.c
DBD-Sybase-1.04/CHANGES
DBD-Sybase-1.04/META.yml
DBD-Sybase-1.04/dbdimp.h
DBD-Sybase-1.04/PWD.factory
DBD-Sybase-1.04/README.vms
DBD-Sybase-1.04/CONFIG
DBD-Sybase-1.04/dbd-sybase.pod
DBD-Sybase-1.04/BUGS
DBD-Sybase-1.04/Sybase.pm
DBD-Sybase-1.04/Sybase.xs
DBD-Sybase-1.04/Makefile.PL
DBD-Sybase-1.04/README
Removing previously used /var/cache/cpan/build/DBD-Sybase-1.04

  CPAN.pm: Going to build M/ME/MEWP/DBD-Sybase-1.04.tar.gz

Sybase OpenClient  found.
The DBD::Sybase module need access to a Sybase server to run the tests.
To clear an entry please enter 'undef'
Sybase server to use (default: SYBASE): omares-pms
User ID to log in to Sybase (default: sa):
Password (default: undef): Sybase database to use on omares-pms (default: 
undef): hotel

* Writing login information, including password, to file PWD.

Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lcs
Note (probably harmless): No library found for -lsybtcl
Note (probably harmless): No library found for -lcomn
Note (probably harmless): No library found for -lintl
Using DBI 1.46 (for perl 5.008004 on i686-linux) installed in 
/usr/lib/perl5/site_perl/5.8.4/i686-linux/auto/DBI/
Writing Makefile for DBD::Sybase
cp dbd-sybase.pod blib/lib/DBD/dbd-sybase.pod
cp Sybase.pm blib/lib/DBD/Sybase.pm
/usr/bin/perl -p -e s/~DRIVER~/Sybase/g 
/usr/lib/perl5/site_perl/5.8.4/i686-linux/auto/DBI//Driver.xst  Sybase.xsi
/usr/bin/perl /usr/lib/perl5/5.8.4/ExtUtils/xsubpp  -typemap 
/usr/lib/perl5/5.8.4/ExtUtils/typemap  Sybase.xs  Sybase.xsc  mv Sybase.xsc 
Sybase.c
cc -c  -I/usr/local/freetds/include 
-I/usr/lib/perl5/site_perl/5.8.4/i686-linux/auto/DBI -fno-strict-aliasing 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   
-DVERSION=\1.04\ -DXS_VERSION=\1.04\ -fpic 
-I/usr/lib/perl5/5.8.4/i686-linux/CORE   Sybase.c
cc -c  -I/usr/local/freetds/include 
-I/usr/lib/perl5/site_perl/5.8.4/i686-linux/auto/DBI -fno-strict-aliasing 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   
-DVERSION=\1.04\ -DXS_VERSION=\1.04\ -fpic 
-I/usr/lib/perl5/5.8.4/i686-linux/CORE   dbdimp.c
Running Mkbootstrap for DBD::Sybase ()
chmod 644 Sybase.bs
rm -f blib/arch/auto/DBD/Sybase/Sybase.so
LD_RUN_PATH=/usr/local/freetds/lib cc  -L/usr/local/freetds/lib -shared 
-L/usr/local/lib Sybase.o dbdimp.o  -o blib/arch/auto/DBD/Sybase/Sybase.so   
-L/usr/local/freetds/lib -lct -ltds -ldl -lm
chmod 755 blib/arch/auto/DBD/Sybase/Sybase.so
cp Sybase.bs blib/arch/auto/DBD/Sybase/Sybase.bs
chmod 644 blib/arch/auto/DBD/Sybase/Sybase.bs
Manifying blib/man3/DBD::Sybase.3
  /usr/bin/make  -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e test_harness(0, 
'blib/lib', 'blib/arch') t/*.t
t/autocommitok
t/base..ok
t/exec..DBD::Sybase::st execute failed: ct_param() failed! at t/exec.t 
line 36.
Use of uninitialized value in numeric ne (!=) at t/exec.t line 38.
DBD::Sybase::st bind_param failed: ct_param() failed! at t/exec.t line 59.
DBD::Sybase::st bind_param failed: ct_param() failed! at t/exec.t line 62.
Use of uninitialized value in numeric ne (!=) at t/exec.t line 65.
DBD::Sybase::st execute failed: ct_param() failed! at t/exec.t line 73.
Use of uninitialized value in numeric ne (!=) at t/exec.t line 74.
DBD::Sybase::st execute failed: ct_param() failed! at t/exec.t line 83.
Use of uninitialized value in numeric ne (!=) at t/exec.t line 84.
Use of uninitialized value in numeric eq (==) at t/exec.t line 87.
t/exec..FAILED test 9
Failed 1/9 tests, 88.89% okay
t/fail..FAILED tests 2, 5, 10, 12
Failed 4/13 tests, 69.23% okay (less 3 skipped tests: 6 okay, 46.15%)
t/login.ok

RE: DBD::Sybase test errors (freetds-0.62.4)

2004-11-29 Thread Jay Hannah

 On Mon, 2004-11-29 at 18:56, Jay Hannah wrote:
  It looks like DBD::Sybase is still working
 
 For certain values of working.

Indeed. The story of my life. -grin-

 FreeTDS unfortunately does not yet implement the full Client Library
 API, so there are a number of things that don't work.
 
 Specifically things like RPCs (that's the ct_param() stuff you saw) and
 placeholders are known not to work (yet).

Roger that. Thanks.

Hypothetically*, would you have any interest in a patch to exec.t (etc.) that 
would use Test::More and the SKIP blocks documented therein to skip tests if 
$ENV{SYBASE} =~ /freetds/? 

j
* In an imaginary universe where I was skilled/daring enough to attempt such a 
thing. 





RE: DBD::Sybase test errors (freetds-0.62.4)

2004-11-29 Thread Jay Hannah
 
  Hypothetically*, would you have any interest in a patch to exec.t
  (etc.) that would use Test::More and the SKIP blocks documented
  therein to skip tests if $ENV{SYBASE} =~ /freetds/? 
 
 Sure.
 
 Patches are always welcome!

I asked because I'd be *changing* how exec.t (etc.) work -- to use Test::More 
in all its glory instead of just printing to STDOUT...

before:
$dbh and print ok 2\n
or print not ok 2\n;

after:
ok($dbh, 'dbh exists');

If you're not a fan of w/ Test::More (especially the SKIP block stuff) I 
wouldn't want to rock the boat...

j






RE: (Fwd) perl future

2004-11-08 Thread Jay Hannah

FWIW,

My company turns about $480M annually. We continue to (aggressively) expand
our use of Apache / Perl / DBI. 

j


---
From: Oscar Gomez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: perl future
Date: Mon, 8 Nov 2004 13:14:48 -0500

all the applications of my company work with apache Perl oracle,I want to
know
as it is the future of the Perl in the world and if we go by the correct
way,
because the directors of the company think that no.
as it is its use in the world.

Thanks Tim





RE: getting rid of the Issuing rollback() warning

2004-02-17 Thread Jay Hannah

From: Tim Bunce [mailto:[EMAIL PROTECTED]
 On Mon, Feb 16, 2004 at 07:46:49PM -0600, Jay Hannah wrote:
 ...it seems that it is being thrown in global destruction in the 2 DBD's 
 I use the most...
  DBD::Informix - Informix 9.3:Issuing rollback() for database...
  DBD::Informix - Informix SE (ancient):   No warning
  DBD::Sybase - freetds - MS-SQL server:  Issuing rollback() for database...
  DBD::Proxy - DBD::Oracle - Oracle (v?): No warning
  DBD::Oracle - Oracle (v?):   No warning
  DBD::mysql:   No warning
 
 I suspect in some of the cases you quote above AutoCommit is not off,
 or the DESTROY is happening during global destruction.

The tests above were all global destruction. perldoc DBI:

   Also, do not rely on the order of object destruction 
   during global destruction, as it is undefined.

It may be undefined, but it does appear reliable for my one server. I get the same 
pattern every time I run my test.

In any event, harkening back to my Programmer X example last night I believe what I'm 
inquiring about is the ability to turn on a flag in DBI so any implicit DESTROYs of 
$dbh's and $sth's would bark.

But if global destruction order is undefined means that no such feature could ever 
be reliable then I withdraw my inquiry because the majority of the cases where I'd 
want the feature would be during global destruction (our sloppy code). 

Do I understand that correctly?

Thanks,

j




OSCON 2004

2004-02-17 Thread Jay Hannah

- Anyone presenting?
- BOF (Birds of a Feather)?
- Who's coming?

I went last year and learned a lot. I'm still sad Tim couldn't make it. I wanted to be 
one of his groupies.

j






RE: getting rid of the Issuing rollback() warning

2004-02-16 Thread Jay Hannah

From: Tim Bunce [mailto:[EMAIL PROTECTED]
 But the Issuing rollback() warning is now only generated if AutoCommit
 is turned off and Executed is true.

I'll miss the warning. It was an easy way to know I or my programmers were being 
sloppy with explicit disconnects.

Enterprise wide all our connects are handled in a shared module in which I set up 
default safety nets:

$options{'RaiseError'} = 1 unless defined($options{'RaiseError'});
$options{'PrintError'} = 1 unless defined($options{'PrintError'});
$options{'AutoCommit'} = 0 unless defined($options{'AutoCommit'});

I would *love* to set another flag/whatever so DBI would bark at us whenever $dbh's 
were garbage collected. Then we'd explicitly know to slap ourselves for writing sloppy 
code... With the warning gone I fear we won't know we're being slobs, especially under 
mod_perl...?

$0.02,

j




RE: getting rid of the Issuing rollback() warning

2004-02-16 Thread Jay Hannah

From: Andrew Pimlott [mailto:[EMAIL PROTECTED]
 On Mon, Feb 16, 2004 at 03:46:28PM -0600, Jay Hannah wrote:
  I would *love* to set another flag/whatever so DBI would bark at us
  whenever $dbh's were garbage collected. 
 
 Can I ask exactly what you are worried about?  
...
 Or am I missing some common usage pattern?

You're right. I shouldn't need the warning, especially when it's wrong. Even so, it 
has been useful to me on many occasions in dialogues like this:

Programmer X: Why am I getting this Issuing rollback() for database handle... error?
Me: Because you're not issuing an explicit $dbh-disconnect when you're done with your 
database handler. 
X: Oh. 
Me: Ya, you need to do that. Let's look at your code... Ok, let's also talk about (1) 
$sth-finish'ing some of these statements, (2) controlling the scope of your $sth's 
and $dbh's, (3) using placeholders instead of frequent prepares of similar SQL, (4) 
avoiding redundant $dbh's at all costs (connect is expensive), (5) tighter management 
of $dbh's / $sth's when running nested transactions...

I guess I'm just used to the warning and have been using it as a flag for years that 
somebody isn't coding as cleanly as they should be. I suppose I'll miss it for the 
wrong reasons. -sniff-

 So while I agree the warning could be helpful, I am skeptical that it
 does enough good to warrant keeping it.  I guess it cold be an option,
 though.

I'm starting to come to grips with it's demise.

 Incidentally, you already don't get the warning during global
 destruction, so it isn't that reliable.

I ran a little test against all our productions RDBMSs. As luck would have it, it 
seems that it is being thrown in global destruction in the 2 DBD's I use the most. I 
didn't realize until now that it's not being thrown in the others.

DBD::Informix - Informix 9.3:Issuing rollback() for database...
DBD::Informix - Informix SE (ancient):   No warning
DBD::Sybase - freetds - MS-SQL server:  Issuing rollback() for database...
DBD::Proxy - DBD::Oracle - Oracle (v?): No warning
DBD::Oracle - Oracle (v?):   No warning
DBD::mysql:   No warning

Thanks for the consideration. I'll get back on my meds now and start pre-emptive 
training rather than reactional code review. -grin-

j

perl -MDBI -e 'DBI-installed_versions'
  Perl: 5.008002(i686-linux)
  OS  : linux   (2.4.18-17.7.x)
  DBI : 1.39
  DBD::mysql  : 2.9003
  DBD::Sybase : 1.02
  DBD::Sponge : 11.09
  DBD::Proxy  : 0.2004
  DBD::Informix   : 2003.04
  DBD::File   : 0.2001
  DBD::ExampleP   : 11.11
  DBD::CSV: 0.2002




perl 5.8.2 / DBD::Informix / DBD::Sybase working great!

2004-01-15 Thread Jay Hannah

Kudos all!! We've got our first production DBI server up and running under 5.8.2 and 
DBD::Informix and DBD::Sybase (freetds to MS-SQL servers). Everything seems to be 
churning along just fine.

perl -MDBI -e 'DBI-installed_versions'
  Perl: 5.008002(i686-linux)
  OS  : linux   (2.4.3-12)
  DBI : 1.39
  DBD::XBase  : 0.147
  DBD::Sybase : 1.02
  DBD::Sponge : 11.09
  DBD::Proxy  : 0.2004
  DBD::Informix   : 2003.04
  DBD::ExampleP   : 11.11

grep VERSION /usr/local/freetds/include/tdsver.h
#define TDS_VERSION_NO freetds v0.61

Yay!

j




RE: Help for DBI installation

2003-12-11 Thread Jay Hannah

From: Edward Pang [mailto:[EMAIL PROTECTED]
 I'm installing DBI on my AIX4.3.3 (4330-10) system. I use gcc-3.3.2 and I have
 installed perl 5.8.0. But I got following error when run make command:

FWIW, after much main and suffering we gave up on building Perl / DBI / DBD::Informix 
(gcc or cc) on AIX 5.1.

Hit groups.google.com for no joy w/ AIX C or gcc

After giving up, the IBM RPM of Perl 5.6.1 (which uses xlc) worked perfectly out of 
the box for DBI and DBD::Informix.

Shrug,

j





RE: Help for DBI installation

2003-12-11 Thread Jay Hannah

From: Jay Hannah [mailto:[EMAIL PROTECTED]
 FWIW, after much main and suffering 

errr...   s/main/pain/

I blame AIX for that typo. That's usually a safe bet. 

Grin,

j




RE: (Slightly OT) Dec. '03 DDJ Article

2003-12-10 Thread Jay Hannah

From: Dean Arnold [mailto:[EMAIL PROTECTED]
 Just curious if anyone else got the latest issue of Dr. Dobbs, and read the
 article Networks, ODBC,  Perl. I couldn't find a single reference to DBI,

I would certainly think a general DBI discussion (rather than just ODBC) would be a 
much more appropriate article when the cover of your issue is Database Development. 

I was interested in poking around with the HTMLy Web Data Manager they printed a 
screenshot of. It was a little hard to track down, but I found a description in the 
Installing the Web data manager section here:

   http://search.cpan.org/src/RKIES/UnixODBC-0.24/README

Sounds like it's ODBC only? I'd be interested in tinkering w/ any brain-dead easy HTML 
interface to an arbitrary DBI datasource (Informix, Oracle, MS-SQL (DBD::Sybase), 
mySQL in my case). ODBC-only doesn't help me. Any alternate webby suggestions?

j


(
   Weirdness:
   Dead link:
   http://search.cpan.org/src/RKIES/UnixODBC-0.24/datamanager/index.html

   The CPAN author RKIES doesn't exist?
   http://www.cpan.org/modules/by-authors/id/
)




RE: Informix, AIX 5.1 -- no joy w/ AIX C or gcc

2003-10-27 Thread Jay Hannah

From: Jonathan Leffler [mailto:[EMAIL PROTECTED]
 If you (and Darryl) could send me outputs of 'perl -V' from your 
 working versions of Perl + DBI + DBD::Informix, it may help 
 me - thanks.

All that fun stuff is in my original post:

Subject: DBD::Informix, AIX 5.1 -- no joy w/ AIX C or gcc
Sent: Mon 10/20/2003 11:07 AM

(Note that subject is different than this subject.) Per my later posts, we got out of 
crisis mode w/ a Perl 5.6.1 RPM. I've retained all of the problem environment, though, 
if you want to instruct me in your ways of C wizardry I'd be happy to do and try 
whatever for the greater good. 

j





RE: Informix, AIX 5.1 -- no joy w/ AIX C or gcc

2003-10-20 Thread Jay Hannah

From: Priest, Darryl - BALTO [mailto:[EMAIL PROTECTED]
 Did you build your own perl, or are you using the perl shipped with AIX?

I built 5.8.0 myself, first w/ AIX's C compiler (w/ all patches circa July 2003)

lslpp -l | grep C for
  vac.C  6.0.0.4  COMMITTED  C for AIX Compiler
  vac.C.readme.ibm   6.0.0.1  COMMITTED  C for AIX iFOR/LS Information
  vac.html.SBCS.search   6.0.0.0  COMMITTED  C for AIX Compiler
  vac.html.common.search 6.0.0.0  COMMITTED  C for AIX Compiler
  vac.html.en_US.C   6.0.0.0  COMMITTED  C for AIX Compiler
  vac.html.en_US.search  6.0.0.0  COMMITTED  C for AIX Compiler
  vac.lic6.0.0.0  COMMITTED  C for AIX Licence Files
  vac.msg.en_US.C6.0.0.1  COMMITTED  C for AIX Compiler Messages -
  xlC.cpp5.0.2.0  COMMITTED  C for AIX Preprocessor
  xlC.msg.en_US.cpp  5.0.2.0  COMMITTED  C for AIX Preprocessor
  vac.C  6.0.0.4  COMMITTED  C for AIX Compiler
  vac.html.SBCS.search   6.0.0.0  COMMITTED  C for AIX Compiler
  vac.html.common.search 6.0.0.0  COMMITTED  C for AIX Compiler
  vac.html.en_US.search  6.0.0.0  COMMITTED  C for AIX Compiler

Then since that didn't work (and making gcc myself failed) I punted to an AIX RPM of 
gcc

gcc -v
  Reading specs from 
/usr/bin/../lib/gcc-lib/powerpc-ibm-aix5.1.0.0/2.9-aix51-020209/specs
  gcc version 2.9-aix51-020209

 Perl and DBI / DBD::Informix must be compiled with the same compiler. 

Indeed. I'm careful that I am doing all 3 on the same compiler.

 We're on AIX 5.2 and I built my own perl, not trusting the threaded perl version
 that IBM had shipped. Did you get DBI installed without problems? What about
 other modules? 

Yes, everything seems fine w/ the install of Perl and DBI, except for warnings. 
Date::Calc, for instance, CPAN'd on no problem. Not being a C guru, I never know an 
ignorable warning vs. a deadly one, and for whatever reason compiling anything on AIX 
always seems to throw gobs of warnings...

 What's the output from perl -V?

You're replying to my 2nd post. My 1st one (15 minutes earlier) has exhaustive 
diagnostics in it, including perl -V.

Thanks,

j





RE: Informix, AIX 5.1 -- no joy w/ AIX C or gcc

2003-10-20 Thread Jay Hannah

  What's the output from perl -V?
 
 You're replying to my 2nd post. My 1st one (15 minutes 
 earlier) has exhaustive diagnostics in it, including perl -V.

Doh! I botched the subject line on my second post, breaking this thread from the 
original, which is undoutedly why you didn't see my first post. The subject lines are:

Informix, AIX 5.1 -- no joy w/ AIX C or gcc
DBD::Informix, AIX 5.1 -- no joy w/ AIX C or gcc

I'll post any additional w/ the 2nd subject line.

Sorry,

j




RE: DBD::Informix, AIX 5.1 -- no joy w/ AIX C or gcc

2003-10-20 Thread Jay Hannah

[ See also other thread under subject Informix, AIX 5.1 -- no joy w/ AIX C or gcc. 
Sorry! ] 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Are we having fun yet?
 
 We've had a hell of a weekend. We upgraded from AIX 4.3.3_11 to 5.1, and 
 can't get DBD::Informix working. 
...

Our crisis is over. Yay!

If anyone has any advice on my 5.8.0 / AIX C / gcc post I'd be happy to research for 
the greater good. 

After 36 hours of pain we gave up on compiling our own Perl/DBI/DBD::Informix and 
tried IBM's RPM of Perl 5.6.1. Worked 99.9% perfect straight out of the box. 
DBD::Informix installed seamlessly. I guess the morale of that story is to do 
everything Big Blue's way when you're on AIX.  

For better or worse, this Perl uses /usr/vac/bin/xlc which seems to just work on AIX 
5.1. We're stuck on Perl 5.6.1 for now, but that's much better than having no 
DBD::Informix at all.

Thanks,

Jay Hannah


---
/opt/freeware/bin/perl -V
---
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=aix, osvers=4.3.3.0, archname=ppc-aix
uname='aix emperor 3 4 000289424c00 unknown '
config_args='-desr -Doptimize=-O2  -Dcc=xlc -Dldflags=-s -Wl,-bmaxdata:0x8000 
-Dinstallprefix=/opt/freeware -Dprefix=/opt/freeware -D
archname=ppc-aix -A define:ld=xlc -A define:ccdlflags=-brtl -bdynamic -A 
define:lddlflags=-bexpall -G -L/opt/freeware/lib'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='xlc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 
-I/usr/local/include -q32 -D_LARGE_FILES -qlonglong',
optimize='-O2 ',
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 
-I/usr/local/include'
ccversion='', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='xlc', ldflags ='-s -Wl,-bmaxdata:0x8000 -L/usr/local/lib -b32'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lbind -lnsl -lgdbm -ldbm -ldb -ldl -lld -lm -lC -lc -lcrypt -lbsd -lPW 
-liconv
perllibs=-lbind -lnsl -ldl -lld -lm -lC -lc -lcrypt -lbsd -lPW -liconv
libc=, so=a, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-brtl -bdynamic 
-bE:/opt/freeware/lib/perl5/5.6.1/ppc-aix/CORE/perl.exp'
cccdlflags=' ', lddlflags='-bexpall -G -L/opt/freeware/lib -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under aix
  Compiled at Apr 25 2003 12:24:22
  @INC:
/opt/freeware/lib/perl5/5.6.1/ppc-aix
/opt/freeware/lib/perl5/5.6.1
/opt/freeware/lib/perl5/site_perl/5.6.1/ppc-aix
/opt/freeware/lib/perl5/site_perl/5.6.1
/opt/freeware/lib/perl5/site_perl
.




RE: Informix, AIX 5.1 -- no joy w/ AIX C or gcc

2003-10-20 Thread Jay Hannah

From: Priest, Darryl - BALTO [mailto:[EMAIL PROTECTED]
 Your lslpp looks identical to what I have, with the remaining caveat that
 I'm on 5.2. However, I now remember that I needed to remove the
 '-qlanglvl=ansi' compile option from the Makefile to get it 
 to compile.

So you used AIX's compiler? Did you install DBD::Informix successfully? What version 
of DBI and DBD::Informix? My own build seemed to work OK on Perl and DBI, but failed 
on DBD::Informix. 

It's ironic if you had to remove -qlanglvl=ansi in DBD::Informix since line 442 of 
Makefile.PL looks like it's in there explicitly to *help* AIX/cc:

# Ensure that __STDC__ is defined for cc on AIX (ie if Perl was not
# compiled with xlc); reported by Joachim Schrod [EMAIL PROTECTED] in
# January 1998.
$opts{DEFINE} .= ' -qlanglvl=ansi'
if ($Config{osname} eq 'aix' and $Config{cc} eq 'cc');

-ponder-,

j




RE: Using perl 5.8.0?

2003-03-03 Thread Jay Hannah

 From: Tim Bunce [mailto:[EMAIL PROTECTED]
 Anyone using perl 5.8.0?

After a lot of upgrades (seg fault, DBI connect hangs), we seem to have one old RedHat 
server happy w/ 5.8.0.

Linux version 2.4.7-10 ([EMAIL PROTECTED]) (gcc version 2.96 2731 (Red Hat Linux 
7.1 2.9
6-98)) #1 Thu Sep 6 17:27:27 EDT 2001

This is perl, v5.8.0 built for i686-linux
DBI-1.34
   DBD-Informix-1.04.PC1
  csdk280_uc21lin_ux
   DBD-Sybase-0.95
  freetds-0.61

Cheers,

j




RE: :Sybase 'make test' failures

2003-02-28 Thread Jay Hannah

 From: Frank Wu [mailto:[EMAIL PROTECTED]
 Now it's fixed with freetds 0.61rc.

Bummer. The half-life of my internal documentation keeps getting shorter. 


perl -pi -e 's/cs_ctx_global/cs_ctx_alloc/g' dbdimp.c  [1]

...

[1] Per this newsgroup post:   -jhannah 1/22/03
---
From: Michael Peppler ([EMAIL PROTECTED])
Subject: Re: help: linux perl5.6.1+freetds0.53+DBI1.21 +DBD::Sybase0.95 installation 
errors 
Newsgroups: perl.dbi.users
Date: 2002-11-07 10:48:10 PST 
 
1. Edit DBD::Sybase's dbdimp.c, and change cs_ctx_global() to cs_ctx_alloc().
---


Thanks for the memories Michael!

Grin,

Jay Hannah
Application Development Manager
Omni Hotels Reservation Center
Tel: (402) 952-6573
Mobile: (402) 578-3976
Email: [EMAIL PROTECTED]

In an ideal world, one of the luxuries of a luxury hotel would be an easier way to 
earn airline miles.




 -Original Message-
 From: Frank Wu [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 7:05 PM
 To: 'Karyn Ulriksen'; 'Gordon Ross'; [EMAIL PROTECTED]
 Subject: RE: :Sybase 'make test' failures
 
 
 I had the same problem with Sybase 0.95/freetds 0.60 (or less) before, and
 Michael Peppler sent me solutions:
 
 Two solutions:
 
 1. Edit DBD::Sybase's dbdimp.c, and change cs_ctx_global() to cs_ctx_alloc().
 
 2. Get the latest CVS snapshot of FreeTDS.
 
 Now it's fixed with freetds 0.61rc.
 
 
 Frank
 
 
 -Original Message-
 From: Karyn Ulriksen [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 26, 2003 10:50 AM
 To: Karyn Ulriksen; 'Gordon Ross'; [EMAIL PROTECTED]
 Subject: DBD::Sybase 'make test' failures
 
 
 
 Here's the 'make test' failures, I'm seeing when running 'make test' on the
 DBD::Sybase 0.95.  Don't see them in 0.94.  Maybe our faithful CPAN
 contributor can make heads or tails of it.  Note the repeated references to
 the undefined cs_ctx_global.  This issues does not come up in 0.94.   This
 same failure occurs with Perl 5.6.0, 5.6.1, and 5.8.0.
-snip!-



RE: Binding a hash to a popup button

2002-11-19 Thread Jay Hannah

Just a little throw-away example for you, in addition to Chris' email...

---
#!/usr/bin/perl -w

use strict;
use Omni::DB; # You probably 'use DBI;'
use CGI;
my $q = new CGI;

my $dbh = Omni::DB::connect_prod();   # You probably 'DBI-connect...'
my $sth = $dbh-prepare(select prop, prop_name from hotels);
$sth-execute;
my (%somelabels, @row);
while (@row = $sth-fetchrow_array) {
   $somelabels{$row[0]} = $row[1];
}
$sth-finish;
$dbh-disconnect;

print $q-popup_menu (
   -name= Blah,
   -values  = [ keys %somelabels ],
   -default = 4,
   -labels  = \%somelabels
);
---

HTH,

Jay Hannah
Application Development Manager
Omni Hotels Reservation Center
Tel: (402) 952-6573
Mobile: (402) 578-3976
Email: [EMAIL PROTECTED]

In an ideal world, one of the luxuries of a luxury hotel would be an easier way to 
earn airline miles.



  -Original Message-
  From: Alfred de Jager [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, November 19, 2002 4:26 AM
  To: Hardy Merrill; [EMAIL PROTECTED]
  Subject: Binding a hash to a popup button
 
 
  Dear List,
 
  I try to bind a hash containing the result of a query to a popup button.
  If I make the hash 'manually' it is not using the result of my
  selection than everything works fine.
-snip!-





RE: Trying to get LIKE to work

2002-11-19 Thread Jay Hannah

 From: Michael A Chase [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 14, 2002 8:47 AM
 
 I recommend using explicit column names instead of '*'.  If someone changes
 the column order on you it could ruin the rest of your processing.

That's what fetchrow_hashref() is for. Asterisks are good. -grin-  The 
performance/efficiency hit is rarely noticeable in my environment.

$0.02,

Jay Hannah
Application Development Manager
Omni Hotels Reservation Center
Tel: (402) 952-6573
Mobile: (402) 578-3976
Email: [EMAIL PROTECTED]

In an ideal world, one of the luxuries of a luxury hotel would be an easier way to 
earn airline miles.







RE: Proble with istallation of module.

2002-10-25 Thread Jay Hannah

Looks like you (probably) have DBD::Interbase version 0.30 installed. Since version 
0.40 is on CPAN, you should upgrade (download and install) and that should fix the 
problem.

If that's not an option for whatever reason, and you're truly desperate you could 
instruct Perl where it can find your old DBD::InterBase by changing the first line of 
your script(s) to:

#!/usr/bin/perl -I/usr/lib/perl5/site_perl/5.6.0/i386-linux/DBD

See perldoc perlrun for info.

That's pretty ugly and should only be used until you get your DBD driver(s) 
updated/reinstalled.

(Congrats on RedHat 8.0. I took that plunge a couple weekends ago. -grin-)

Cheers,

Jay Hannah
Application Development Manager
Omni Hotels Reservation Center
[EMAIL PROTECTED]
V: 1-402-952-6573
F: 1-402-334-8013



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:rino.mail;libero.it]
 Sent: Friday, October 25, 2002 3:28 PM
 To: [EMAIL PROTECTED]
 Subject: Proble with istallation of module.


 I had upgrate RedHat from 7.3 to 8.0
 And my application don't work!
 Probably it don't find InterBase.pm
 Please, Help me! What can I do?


 install_driver(InterBase) failed: Can't locate 
 DBD/InterBase.pm in @INC (@INC contains: 
 /usr/lib/perl5/5.8.0/i386-linux-thread-multi 
 /usr/lib/perl5/5.8.0 
 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi 
 /usr/lib/perl5/site_perl/5.8.0
 /usr/lib/perl5/site_perl 
 /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi 
 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl 
 .) at (eval 4) 
 line 3.
 Perhaps the DBD::InterBase perl module hasn't been fully installed,
 or perhaps the capitalisation of 'InterBase' isn't right.
 Available drivers: ExampleP, Pg, Proxy, mysql.
  at ./loginuser.pl line 18


 MY PROGRAM:
 =
 [root@localhost ago]# cat loginuser.pl
 #! /usr/bin/perl
 
 use CGI;
 use DBI;

 OTHER INFORMATIONS:
 =
 [root@localhost ago]# locate InterBase.pm
 /usr/lib/perl5/site_perl/5.6.0/i386-linux/Bundle/DBD/InterBase.pm
 /usr/lib/perl5/site_perl/5.6.0/i386-linux/DBD/InterBase.pm
 /usr/lib/perl5/site_perl/InterBase.pm
 /home/rin/download/interbase_perl/InterBase.pm
 /home/rin/download/interbase_perl/DBD-InterBase-0.30/lib/Bundle/DBD/InterBase.pm
 /home/rin/download/interbase_perl/DBD-InterBase-0.30/InterBase.pm
 /home/rin/download/interbase_perl/DBD-InterBase-0.30/blib/lib/DBD/InterBase.pm
 /home/rin/download/interbase_perl/DBD-InterBase-0.30/blib/lib/Bundle/DBD/InterBase.pm




RE: Strange problem with

2002-10-21 Thread Jay Hannah

Ouch. Try this instead:

my %hash_ref;
while ($hash_ref = $sth-fetchrow_hashref) {
   print available_hours1: $$hash_ref{'available_hours1'}\n;
   print available_hours2: $$hash_ref{'available_hours2'}\n;
   print available_hours3: $$hash_ref{'available_hours3'}\n;
}

That should help you find the problem.

Jay Hannah
Application Development Manager
Omni Hotels Reservation Center
[EMAIL PROTECTED]
V: 1-402-952-6573
F: 1-402-334-8013



 -Original Message-
 From: Brad Smith [mailto:mata;matatech.tzo.com]
 Sent: Monday, October 21, 2002 8:00 PM
 To: [EMAIL PROTECTED]
 Subject: Strange problem with 
 
 
 Using an access database with DBI and DBD-ODBC, I am having the 
 strangest problem, and I can't seem to solve it.
 
 The table has three fields, named available_hours1, available_hours2 
 and available_hours3.  When I retrieve the data, the contents of 
 available_hours1 shows up when I say to print available_hours2.  
 Below is my code, which I have combed over and over.  I can't 
 find the 
 problem.  I was hoping better eyes and wiser minds could figure out 
 where my problem may be:
 
 my $dbh = DBI-connect('dbi:ODBC:greene_resource_providers') || die 
 DBI::errstr;
 my $sth = $dbh-prepare(SELECT name, nickname, address1, 
 address2, address3, city, state,
   
 zipcode, telephone1, telephone2, telephone3, private,
   
 tollfree1, tollfree2, hotline1, hotline2, fax,
   
 contact_name, contact_title, director_name, director_title, email1,
   email2, 
 website, available_hours1, available_hours2, available_hours3,
   
 eligibility1, eligibility2, eligibility3, eligibility4, eligibility5,
   
 eligibility6, service1, service2, service3, service4,
   
 service5, service6, service7, service8, service9,
   
 service10, service11, service12, service13, service14,
   
 service15, service16, service17, service18, service19,
   
 service20, service21, service22, service23, service24,
   
 service25, fee_structure1, fee_structure2, appointment, 
 required_documentation,
   
 funding_source, service_code, legal_code, speaker, volunteer_use,
   
 volunteer_need, volunteer_description, handicap_code, last_update, 
 tax1,
   tax2, 
 tax3, tax4, tax5, tax6, tax7, tax8, tax9, tax10, tax11,
   tax12, 
 tax13, tax14, tax15, tax16, tax17, tax8, tax19, tax20,
   tax21, 
 tax22, tax23, tax24, tax25
  FROM resource_providers
  WHERE sid=?
 );
 $sth-execute($in{'sid'});
 
 while (($name, $nickname, $address1, $address2, $address3, $city, 
 $state,
   $zipcode, $telephone1, $telephone2, $telephone3, 
 $private,
   $tollfree1, $tollfree2, $hotline1, $hotline2, $fax,
   $contact_name, $contact_title, $director_name, 
 $director_title, $email1,
   $email2, $available_hours1, $available_hours2, 
 $available_hours3,
   $eligibility1, $eligibility2, $eligibility3, 
 $eligibility4, 
 $eligibility5,
   $eligibility6, $service1, $service2, $service3, 
 $service4,
   $service5, $service6, $service7, $service8, $service9,
   $service10, $service11, $service12, $service13, 
 $service14,
   $service15, $service16, $service17, $service18, 
 $service19,
   $service20, $service21, $service22, $service23, 
 $service24,
   $service25, $fee_structure1, $fee_structure2, 
 $appointment, $required_documentation,
   $funding_source, $service_code, $legal_code, 
 $speaker, $volunteer_use,
   $volunteer_need, $volunteer_description, 
 $handicap_code, $last_update, $tax1,
   $tax2, $tax3, $tax4, $tax5, $tax6, $tax7, $tax8, $tax9, 
 $tax10, $tax11,
   $tax12, $tax13, $tax14, $tax15, $tax16, $tax17, $tax18, 
 $tax19, $tax20,
   $tax21, $tax22, $tax23, $tax24, $tax25)=$sth-
 fetchrow_array) {   code truncated here
 
 Brad Smith