× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Paul said:
Hi. I've seen a few examples of using BLOBs and I can get it working, but I can't find details about the syntax for SQLTYPE.
In this example, what does the number 500 represent?

D MYBLOB S SQLTYPE(BLOB:500)

In a CLOB, I'd expect it to be the number of characters, but for a BLOB is it the number of bytes?
Is this a fixed size for the object? Or an upper limit? Or just an initial allocation and then the system uses as much space as required?

Any idea how big this number can be before we have to consider the impact on the system?
I realise it depends on our hardware and the number of jobs we're running... but is 500000 big? Or 5000000?
The reason for asking is that we generally expect small PDFs but it's possible to have repeating sections so in rare cases we get very large files.

=============================

The Embedded SQL Programming manual provides an example
https://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzajp/rzajpirpglobhost.htm

Your D-spec above would result in the generation of the following structure:

D MYBLOB DS
D MYBLOB_LEN 10U
D MYBLOB_DATA 500A CCSID(65535)

- i.e. a BLOB is implemented as a character variable – so the figure of 500 maps to 500-bytes.
The following Redbook is very old but is still relevant and provides detailed information on DB2 LOB support. To gain the flexibility you wish on LOB size, you may wish to investigate LOB locators.
http://publib-b.boulder.ibm.com/abstracts/sg245409.html?Open
(See Chapter 2.)

Hope this helps,
Brian Parkins.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.