473,780 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Host Variables

We're encountering an issue with working with CLOB's. We're doing a
basic insert into a table that has a CLOB column. Sometimes the CLOB
is fairly tame in size (10k-15k), and once in a while they're fairly
large (30k-60k).

When the CLOB (character string) is greater than 32K, the insert
fails. Found some documentation which mentions that a LOB can't be
larger than 32K, and if it is, it needs to be handled via assignment
of host variables . I've seen host variables before (:xyz), but
haven't actually worked with them.

Here's what IBM says my problem is:

SQL0102N The string constant beginning with
" 'SUkqANiYAAAmoC A3+QyQ1Bzj5DJCF mQybZrkMgGdQVsD Kw45D
UcgcwLwQyQbvynF ODI+I" is too long.

Explanation:

One of the following has occurred:
The string constant beginning with "<string>" has a length
greater than 32672 bytes. Character strings with lengths greater
than 32672 bytes or graphic strings with lengths greater than 16336
characters can be specified only through assignment from host
variables. Note that other servers in the DB2 family of products
may specify a different size limit for character strings. Consult
the documentation for the appropriate DB2 product for details.

sqlcode : -102

sqlstate : 54002

The column this is being inserted into is a CLOB(1M) - plenty of room
for a 52K CLOB...

I'm out of ideas here...
Nov 12 '05 #1
3 7508
You'll find that the DB2 manuals answer most of the questions you'll ever
have, particularly standard techniques like handling LOBs.

The manual you want is the Application Development Guide. There is a chapter
there called "Using Large Objects (LOBs)" which should answer your
questions. It includes examples of these techniques.
You'll find the manuals under IBM DB2/Information in the Start/Programs menu
of Windows (assuming you are using Windows).

Rhino

"Anthony Robinson" <an*****@yahoo. com> wrote in message
news:d1******** *************** ***@posting.goo gle.com...
We're encountering an issue with working with CLOB's. We're doing a
basic insert into a table that has a CLOB column. Sometimes the CLOB
is fairly tame in size (10k-15k), and once in a while they're fairly
large (30k-60k).

When the CLOB (character string) is greater than 32K, the insert
fails. Found some documentation which mentions that a LOB can't be
larger than 32K, and if it is, it needs to be handled via assignment
of host variables . I've seen host variables before (:xyz), but
haven't actually worked with them.

Here's what IBM says my problem is:

SQL0102N The string constant beginning with
" 'SUkqANiYAAAmoC A3+QyQ1Bzj5DJCF mQybZrkMgGdQVsD Kw45D
UcgcwLwQyQbvynF ODI+I" is too long.

Explanation:

One of the following has occurred:
The string constant beginning with "<string>" has a length
greater than 32672 bytes. Character strings with lengths greater
than 32672 bytes or graphic strings with lengths greater than 16336
characters can be specified only through assignment from host
variables. Note that other servers in the DB2 family of products
may specify a different size limit for character strings. Consult
the documentation for the appropriate DB2 product for details.

sqlcode : -102

sqlstate : 54002

The column this is being inserted into is a CLOB(1M) - plenty of room
for a 52K CLOB...

I'm out of ideas here...

Nov 12 '05 #2
You don't say what interface you're using for your application...I will
assume embedded...

A good example of using lobs in embedded sql applications can be found
in sqllib/samples/c/dtlob.sqc

Anthony Robinson wrote:
We're encountering an issue with working with CLOB's. We're doing a
basic insert into a table that has a CLOB column. Sometimes the CLOB
is fairly tame in size (10k-15k), and once in a while they're fairly
large (30k-60k).

When the CLOB (character string) is greater than 32K, the insert
fails. Found some documentation which mentions that a LOB can't be
larger than 32K, and if it is, it needs to be handled via assignment
of host variables . I've seen host variables before (:xyz), but
haven't actually worked with them.

Here's what IBM says my problem is:

SQL0102N The string constant beginning with
" 'SUkqANiYAAAmoC A3+QyQ1Bzj5DJCF mQybZrkMgGdQVsD Kw45D
UcgcwLwQyQbvynF ODI+I" is too long.

Explanation:

One of the following has occurred:
The string constant beginning with "<string>" has a length
greater than 32672 bytes. Character strings with lengths greater
than 32672 bytes or graphic strings with lengths greater than 16336
characters can be specified only through assignment from host
variables. Note that other servers in the DB2 family of products
may specify a different size limit for character strings. Consult
the documentation for the appropriate DB2 product for details.

sqlcode : -102

sqlstate : 54002

The column this is being inserted into is a CLOB(1M) - plenty of room
for a 52K CLOB...

I'm out of ideas here...

Nov 12 '05 #3
Sean McKeough <mc******@nospa m.ca.ibm.com> wrote in message news:<c1******* ***@hanover.tor olab.ibm.com>.. .
You don't say what interface you're using for your application...I will
assume embedded...

A good example of using lobs in embedded sql applications can be found
in sqllib/samples/c/dtlob.sqc

Anthony Robinson wrote:
We're encountering an issue with working with CLOB's. We're doing a
basic insert into a table that has a CLOB column. Sometimes the CLOB
is fairly tame in size (10k-15k), and once in a while they're fairly
large (30k-60k).

When the CLOB (character string) is greater than 32K, the insert
fails. Found some documentation which mentions that a LOB can't be
larger than 32K, and if it is, it needs to be handled via assignment
of host variables . I've seen host variables before (:xyz), but
haven't actually worked with them.

Here's what IBM says my problem is:

SQL0102N The string constant beginning with
" 'SUkqANiYAAAmoC A3+QyQ1Bzj5DJCF mQybZrkMgGdQVsD Kw45D
UcgcwLwQyQbvynF ODI+I" is too long.

Explanation:

One of the following has occurred:
The string constant beginning with "<string>" has a length
greater than 32672 bytes. Character strings with lengths greater
than 32672 bytes or graphic strings with lengths greater than 16336
characters can be specified only through assignment from host
variables. Note that other servers in the DB2 family of products
may specify a different size limit for character strings. Consult
the documentation for the appropriate DB2 product for details.

sqlcode : -102

sqlstate : 54002

The column this is being inserted into is a CLOB(1M) - plenty of room
for a 52K CLOB...

I'm out of ideas here...


We're using Tibco and ADB, and java. Tibco/ADB just calls a stored
procedure/ad hoc sql and then ruturns a record set, etc. We're not
using any C anywhere.

Ideally, any solution we implement would need to be done on the
database configuration side.
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5999
by: Chris | last post by:
I have tableA, defined as: field1 varchar2(10), field2 varchar2(10), field3 varchar2(10) I have host variables defined as: v1 pic x(10) varying v2 pic x(10) varying
4
13070
by: Tim.D | last post by:
People, I've ventured into the wonderful world of Stored Procedures. My first experience has been relatively successful however I am stuck on using host variables to specifiy actualy table or column names in a FROM clause. After many hours or reading all manner of manuals I've discovered it appears this is not possible and that in order to so I need to further venture into dynamic SQL. My present procedure is based on all static SQL...
3
6829
by: claus.hirth | last post by:
Does the term 'host variable' cover a variable locally declared in a SQL-PL stored procedure? I am asking this question in the context of the SELECT INTO statement.
4
2526
by: 4.spam | last post by:
Hello. UDB DB2 v8.2.1 for LUW. Why this function can't be compiled? --- CREATE FUNCTION MYLIKE(NM VARCHAR(128)) LANGUAGE SQL RETURNS INTEGER BEGIN ATOMIC RETURN
2
5621
by: Frank Swarbrick | last post by:
I'm just learning about embedded SQL, so be gentle... My basic question is, if I use a fixed length host variable for a column defined as VARCHAR, will trailing spaces be removed (or not) upon INSERT or UPDATE of this column? I tried it, and it appears they are *not* stripped. However, the Programming Client Applications manual leads me to believe that the spaces should be stripped. A quote from that manual: -------------------------...
7
13713
by: misha | last post by:
Hello. I was wandering if someone could explain to me (or point to some manual) the process of mapping the addresses of host variables by DB2. Especially I would like to know when DB2 decides to reinitialize the addresses and even more when it decides not to do it. Recently I've ben strucked with a problem of host variables defined in LINKAGE SECTION, and it took me some time to find the cause and solution for the problem.
5
8187
by: Patrick | last post by:
Hi all, In my SQL procedures in DB2 8.2, I current declare several cursors that return select statements with 10 columns in it. As a result, assigning host variables becomes a coding mess, as I would have to declare anywhere from 50-100 host variables just so I can process them. Is it possible to fetch the row from a cursor into a single
19
2577
by: hansBKK | last post by:
Upfront disclaimer - I am a relative newbie, just starting out learning about PHP, mostly by researching, installing and playing with different scripts. I am looking for a host that will provide the right environment for this - running a wide variety of PHP applications. I realise that security is also important, but for now flexibility is more important to me. Note that I'm **not** looking for people to recommend hosting companies, I...
3
18146
FishVal
by: FishVal | last post by:
Windows Script Host Object library. Full name: Windows Script Host Object Model LibName: IWshRuntimeScripting Location: ...\WINDOWS\system32\wshom.ocx The present tip is closely related to the previous stuff written by ADezii concerning Scripting Runtime library. Both libraries share the same functionality as for file functions but the library in the topic provides additional possibilities which may be advantageously used. Here is a...
0
9636
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10139
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9931
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6727
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5504
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.