× 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.



Here's the deal. I've got disk being burnt quick and it seems as though it may be due to converting a 32K character column to a CLOB(1M).

I think that I've found the reason...

In determining the length of the CLOB column at write time, it was calculated using:

CLOB_Len = %len(%trim(clob));

But this seems to only trim the x'40' characters off the end of the string. Somehow , the clob variable was padded with x'00'...so the %trim() didn't work...it returned the whole length...1M.

To repair it, I used SQL trim to whack the trailing x'00' characters, calc'ed the length of this much shorter string, and got the correct answer:

reset Clob;
CLOB = %trim(parm_in);
exec sql set :length = length(trim(trailing x'00' from :parm_in));
CLOB_Len = length;

Thanks all!

Steve Needles


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John Yeung
Sent: Tuesday, March 03, 2015 11:32 AM
To: Midrange Systems Technical Discussion
Subject: Re: Where is CLOB data physically stored?

On Tue, Mar 3, 2015 at 11:39 AM, Needles,Stephen J <SNEEDLES@xxxxxxxxxxxxxxxx> wrote:
I'm trying to understand a few of things and so far, my research hasn't satisfied me. We are trying to get our heads around our disk usage and have a couple of questions we've been unable to find answers for.

While your questions are valid, it might be helpful to also share the reason you're asking these questions in the first place. Are you running out of disk space? Using a lot more disk space than you expected? Wondering how to design a new table? Is there something in particular which prompted you to focus on CLOBs?

John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

________________________________
This communication, including attachments, is confidential, may be subject to legal privileges, and is intended for the sole use of the addressee. Any use, duplication, disclosure or dissemination of this communication, other than by the addressee, is prohibited. If you have received this communication in error, please notify the sender immediately and delete or destroy this communication and all copies.

TRVDiscDefault::1201

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.