473,788 Members | 2,905 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

REPEAT --> Simple Question on Statement Size

I feel really embarassed asking this.
However, ask I will.

When we say that:
(1) "CLP in Db2 V8.2 still imposes a limit of 64K on the stored proc
size;
(2) "....If you use another client, such as command center or
development center the SP size limit is 2MB";
(3) "Statement size has been increased to allow 2M in Stinger"

etc etc, what size are we referring to? I am baffled:
(1) Is it that my text file that holds the SP code should be less than
64k?
OR
(2) How to ascertain SP size when using Development Center?
OR
(3) How do you measure the statement size while executing from CLP /
Command Editor?

As simple as this may be, someone pl throw light (and enlighten me).

TiA...........a nurag

Nov 12 '05 #1
4 1687
Anurag,

teh size in question is the "SQL Statement Size".
CLP cannot handle an SQL Statement size bigger than 64K.
CREATE PROCEDURE is one(!) SQL Statenent including all the whitepace and
comments which are preserved in the catalog.
So you can have megabyte sized scripts and feed them into CLP via
db2 -td% -f <bigfile>

Does CLP provide a way to measure teh size of teh individual SQL
Statements? No. And it shoudln't. I for one, much rather have CLP fixed
then waste resources on the symptom?
If you need to knwo the size of a CREATE PROCEDURE statement package it
into an individual file... voila.
Note that to the best of my knowledge CLP is the only client interface
with that limit. If you access DB2 via JDBC/ODBC, embedded SQL or the
GUIs this limit does not exist in V8.2.
If, by any means 2MB is not big enough speak up: It's just a random
number that was thought to be reasonable.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2
Hi Serge,
Thanks for the info.

What now worries me is the method that you advise to measure size of
the SQL statement (or Procedure). Different software editors (like
TEXTPAD / NOTEPAD / EDITPLUS etc on WINDOWS) would display different
file sizes!!!
And the natural followup question is - How does my DB2 measure the
statement size?

Thanks......... anurag
P.S. - Questions open to other readers also :-)

Nov 12 '05 #3
Anurag wrote:
Hi Serge,
Thanks for the info.

What now worries me is the method that you advise to measure size of
the SQL statement (or Procedure). Different software editors (like
TEXTPAD / NOTEPAD / EDITPLUS etc on WINDOWS) would display different
file sizes!!! I am rather surprised by the fact that this issue is so important to
you. Are you sure you are concentrating on the right issue here?
Whether a routine is 60k or 64k long, in my book, as a 20 year
C-developer that is too long. So whether the thumbrule of checking the
filesize is accurate or not is besides the point.
64k are a booklet of 30 pages!
And the natural followup question is - How does my DB2 measure the
statement size?

DB2 measures the byte length of the string. Presumably PERL would be
able to do this measurement if you need a tool.

If this limitation would be there to stay I might see your point and may
be work towards an error message token, but given that it's a leftover
to be removed it's hardly worth the effort, unless you intend to write
2MP large SQL statements.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #4
Anurag wrote:
Hi Serge,
Thanks for the info.

What now worries me is the method that you advise to measure size of
the SQL statement (or Procedure). Different software editors (like
TEXTPAD / NOTEPAD / EDITPLUS etc on WINDOWS) would display different
file sizes!!!
And the natural followup question is - How does my DB2 measure the
statement size?

Thanks......... anurag
P.S. - Questions open to other readers also :-)


Keep in mind not every editor uses the same newline discipline.
where one would place a \n another may place \r
That's 1 Byte per line.

But still, if you issue a 'dir' in CMD and you see the filesize in
bytes, then that is you size.

-R-
Nov 12 '05 #5

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

Similar topics

1
2098
by: Aleksandr Dubinskiy | last post by:
I am curious if there is good way to read in strings one word (an alphanumeric sequence of characters) at a time from a file using the >> operator. I don't want to read one character at a time or use scanf. Alex
31
14351
by: da Vinci | last post by:
OK, this has got to be a simple one and yet I cannot find the answer in my textbook. How can I get a simple pause after an output line, that simply waits for any key to be pressed to move on? Basically: "Press any key to continue..." I beleive that I am looking for is something along the lines of a....
1
1303
by: gene.ellis | last post by:
Hey everyone, There is probably a really simple solution. I have an XSL document that reads into content from my XML document and creates an HTML document (with a .php extension). There is some PHP code I would like to include on the XSL document, however I don't want to XML/XSL engine to try and interpret it. I would simply like the PHP code to pass through from the XSL document and be included on the HTML document unchanged. From there...
2
1818
by: Anurag | last post by:
This simple one beats me all ends up(sincerely). I have been doing DB2 UDB for some time now, reading a lot of good discussions in this forum, writing some answers, asking a lot more but this simple question has floored me completely. Either I pretend that I know or I could let the kowledgable ones pass on some wisdom to me :-) When we say that: (1) "CLP in Db2 V8.2 still imposes a limit of 64K on the stored proc size;
2
3965
by: Dmitri Shvetsov | last post by:
Hi, I'm using these strings around DataGrid <div ID="div1" style="LEFT: 4px; OVERFLOW: auto; WIDTH: 100%; POSITION: absolute; TOP: 248px; HEIGHT: 300px"> ....datagrid... </div>
5
9317
by: John A Grandy | last post by:
I have a js function that dynamically generates a block of html that includes an anchor tag : <a href="http://www.google.com" target="_blank" /> When the user clicks this link, the new IE6 browser window is full vertical size, but only half horizontal size (of available screen area). Starting iexplore.exe independently opens a full-size browser window.
2
4902
by: --CELKO-- | last post by:
We just got a "SQL Statement too long or complex" error on the ISERIES. James was able to get a compile after replacing some full table names with (much shorter) correlation names, etc. I have not see his query, but what are the statement size limits? I thought they would be so large that this should not happen in a practical situation.
0
9656
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
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9967
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
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
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
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
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
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.