First question: when you're writing out the images to the file handle, are you setting binmode on the file handle? Some operating systems have a lovely habit of truncating files on the first CTRL-Z character they see -- not that you've told us what operating system you're running your program on.

That looks like code directly from the Perl sample 'dtlob.pl' included with DB2 for Linux, UNIX, and Windows in the ~/sqllib/samples/perl/ directory (visible online in the DB2 Information Center)

Have you tried running that sample program against the DB2 SAMPLE database (created with the db2sampl command)? If the sample program works, then the problem is either with your application, your database schema, or your builds of DBI (current version 1.46) or DBD::DB2 (current version 0.78).

Are you connecting to a DB2 for Linux, UNIX, and Windows database server, or to a DB2 for iSeries or zSeries server?

To really assist you, you need to give us more information.

Note that the DBD::DB2 driver is officially supported by IBM, so you can open a PMR (problem report) if you have a support contract for DB2 with IBM. Of course, you'll need to provide much more information than you've provided here.


In reply to Re: DBI::DB2 buffer problem by dazzle
in thread DBI::DB2 buffer problem by htrobert

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.