serge wrote:
I have a stored procedure that is over 1000 + lines of code. When i try to
compile
I get the following error:
ABC.TEST123: 1285: [IBM][CLI Driver][DB2/NT] SQL0104N An unexpected
token "END" was found following " END IF; END IF; ". Expected tokens may
include: "END". LINE NUMBER=1285. SQLSTATE=42601
I tried creating a new tablespace + buffer pool on this database but still
compile
errors. I don't necessarily understand a lot about the tablespace and the
buffer pool,
but I did my best to create it. Maybe i didn't give the correct size? I
chose 32k.
Would you know if the compile problem i am getting is caused by a low buffer
pool
size or something? If i start commenting blocks of code, the compile error
goes to a
different line. But all the lines the compile complains about seem OK to me.
Any help? What would you suggest i try?
Thank you
That's indeed an amusing error message :-)
It has absolutely nothing to do with any buffer bool or so.
The problem must lie in the syntax.
I consider a procedure of this size a bit over teh top.
No so much because DB2 can't hanelde it (it can), but because it will be
both hard to read, and if you just find out, to debug.
Note that CLP in Db2 V8.2 still imposes a limit of 64K on the stored
proc size. You can check whether you're close to that by checking teh
file length.
If you use another client, such as command center or development center
the limit is 2MB which should be plenty.
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab