Unix Technical Forum

A dream of more functional CLP in v8.3

This is a discussion on A dream of more functional CLP in v8.3 within the DB2 forums, part of the Database Server Software category; --> Dear IBM DB2 support, I wish CLP would have been more functional. Without living the command line I would ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 08:05 AM
sopranos2@gmail.com
 
Posts: n/a
Default A dream of more functional CLP in v8.3

Dear IBM DB2 support,

I wish CLP would have been more functional. Without living the command
line I would like to get sql return code explanations, scalar function
definitions etc..

Looking forward to see CLP enhancements in v8.3

-mike

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 08:06 AM
Serge Rielau
 
Posts: n/a
Default Re: A dream of more functional CLP in v8.3

sopranos2@gmail.com wrote:
> Dear IBM DB2 support,
>
> I wish CLP would have been more functional. Without living the command
> line I would like to get sql return code explanations, scalar function
> definitions etc..
>
> Looking forward to see CLP enhancements in v8.3

DB2 V8.3? There will be no such thing.

Have you tried:
? SQL0204
in CLP. ? gives SQL CODE and SQLSTATE explanations.
SELECT TEXT FROM SYSCAT.ROUTINES WHERE ROUTINENAME = 'FOO' and
ROUTINESCHEMA = 'SRIELAU'
Gives you function bodies (or do you mean something else?)
What is etc. ???

I'm collecting requirements for Viper+2, so go wild :-)

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 08:06 AM
Konstantin Andreev
 
Posts: n/a
Default Re: A dream of more functional CLP in v8.3

"Serge Rielau" <srielau@ca.ibm.com> wrote:
news:4d8q4cF19lrhtU1@individual.net...
>
> I'm collecting requirements for Viper+2, so go wild :-)
>


Serge, I'm glad to here the such invitation. Could you make public the
currently collected wish list for Viper?
--
Konstantin Andreev.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 08:06 AM
Serge Rielau
 
Posts: n/a
Default Re: A dream of more functional CLP in v8.3

Konstantin Andreev wrote:
> "Serge Rielau" <srielau@ca.ibm.com> wrote:
> news:4d8q4cF19lrhtU1@individual.net...
>> I'm collecting requirements for Viper+2, so go wild :-)
>>

>
> Serge, I'm glad to here the such invitation. Could you make public the
> currently collected wish list for Viper?

Well Viper is done and over...

But sure I can do a quick brain-dump of SQL-ish feature requests I'm
aware of (in random order) or ideas that I have on my own:
* row-comparisons (Bernard's favorite)
CREATE TABLE T1(c1 int, c2 int);
SELECT * FROM T1 WHERE (c1, c2) > (?, ?)
* mySQL style OFFSET clause:
SELECT * FROM T FETCH FIRST 5 ROWS OFFSET 10
* improve schema evolution
e.g. allow objects to be dropped and invalidate dependent objects for
auto revalidation. (No more need to tear down the object stack)
* implicit casting.
DB2 appears to be the only DBMS that implements SQL standard strict
typing...
anything from improving NULL, and parameter marker handling to
allowing comparisons between strings and numbers or concatenation of
strings and numbers: 'Hello' || 5 => 'Hello5'
* SQL Standard ARRAY type
* Some sort of "global" variable
* Some sort of "context" (like a login-script)
* Strengthening the concept of a schema
(or introducing SQL standard MODULES)
* "optimistic locking"
* Expose physical ROWID
* CS isolation without readers blocking writers (and vice versa)
* Snapshot Isolation
* SQL PL outside of procedures
(generalizing the BEGIN ATOMIC.. END)
* INTERVAL data type
* Informix style DATETIME
DATE(MONTH TO DAY)
or TIME(HOUR TO MILLISOCOND)
* DECFLOAT data type (exact numeric floating point)
* BOOLEAN data type
* [VAR]BINARY data type
* A way to put a session/server into auto-commit and then support
explicit start transaction (perhaps nested)
* autonomous transactions
* Full SQL PL support in SQL functions
* Full SQL PL support in Triggers
* user defined aggregates
* _CREATE_ GLOBAL TEMPORARY TABLES (like DB2 zOS)
* TRUNCATE TABLE statement

Well... one thing is for sure.. there is always work....
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 08:06 AM
Rhino
 
Posts: n/a
Default Re: A dream of more functional CLP in v8.3


"Serge Rielau" <srielau@ca.ibm.com> wrote in message
news:4d9de8F19ars9U1@individual.net...
> Konstantin Andreev wrote:
>> "Serge Rielau" <srielau@ca.ibm.com> wrote:
>> news:4d8q4cF19lrhtU1@individual.net...
>>> I'm collecting requirements for Viper+2, so go wild :-)
>>>

>>
>> Serge, I'm glad to here the such invitation. Could you make public the
>> currently collected wish list for Viper?

> Well Viper is done and over...
>
> But sure I can do a quick brain-dump of SQL-ish feature requests I'm aware
> of (in random order) or ideas that I have on my own:
> * row-comparisons (Bernard's favorite)
> CREATE TABLE T1(c1 int, c2 int);
> SELECT * FROM T1 WHERE (c1, c2) > (?, ?)
> * mySQL style OFFSET clause:
> SELECT * FROM T FETCH FIRST 5 ROWS OFFSET 10
> * improve schema evolution
> e.g. allow objects to be dropped and invalidate dependent objects for
> auto revalidation. (No more need to tear down the object stack)
> * implicit casting.
> DB2 appears to be the only DBMS that implements SQL standard strict
> typing...
> anything from improving NULL, and parameter marker handling to
> allowing comparisons between strings and numbers or concatenation of
> strings and numbers: 'Hello' || 5 => 'Hello5'
> * SQL Standard ARRAY type
> * Some sort of "global" variable
> * Some sort of "context" (like a login-script)
> * Strengthening the concept of a schema
> (or introducing SQL standard MODULES)
> * "optimistic locking"
> * Expose physical ROWID
> * CS isolation without readers blocking writers (and vice versa)
> * Snapshot Isolation
> * SQL PL outside of procedures
> (generalizing the BEGIN ATOMIC.. END)
> * INTERVAL data type
> * Informix style DATETIME
> DATE(MONTH TO DAY)
> or TIME(HOUR TO MILLISOCOND)
> * DECFLOAT data type (exact numeric floating point)
> * BOOLEAN data type
> * [VAR]BINARY data type
> * A way to put a session/server into auto-commit and then support
> explicit start transaction (perhaps nested)
> * autonomous transactions
> * Full SQL PL support in SQL functions
> * Full SQL PL support in Triggers
> * user defined aggregates
> * _CREATE_ GLOBAL TEMPORARY TABLES (like DB2 zOS)
> * TRUNCATE TABLE statement
>
> Well... one thing is for sure.. there is always work....


You're right about that Serge! It's hard to picture DB2 ever being
completely finished!

I can think of at least one thing that ought to be added to this list, if it
isn't already in Viper:
* some way to debug Java stored procedures and UDFs in the debuggers of
popular IDEs like Eclipse. I have never been able to the get IBM Integrated
Debugger to work and have had to resort to writing lines to files to debug
my code. That is not nearly as nice as using a modern debugger where I can
step into statements and check variable values on the fly.

--
Rhino


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 08:06 AM
Serge Rielau
 
Posts: n/a
Default Re: A dream of more functional CLP in v8.3

Rhino wrote:
> "Serge Rielau" <srielau@ca.ibm.com> wrote in message
> news:4d9de8F19ars9U1@individual.net...
>> Konstantin Andreev wrote:
>>> "Serge Rielau" <srielau@ca.ibm.com> wrote:
>>> news:4d8q4cF19lrhtU1@individual.net...
>>>> I'm collecting requirements for Viper+2, so go wild :-)
>>>>
>>> Serge, I'm glad to here the such invitation. Could you make public the
>>> currently collected wish list for Viper?

>> Well Viper is done and over...
>>
>> But sure I can do a quick brain-dump of SQL-ish feature requests I'm aware
>> of (in random order) or ideas that I have on my own:
>> * row-comparisons (Bernard's favorite)
>> CREATE TABLE T1(c1 int, c2 int);
>> SELECT * FROM T1 WHERE (c1, c2) > (?, ?)
>> * mySQL style OFFSET clause:
>> SELECT * FROM T FETCH FIRST 5 ROWS OFFSET 10
>> * improve schema evolution
>> e.g. allow objects to be dropped and invalidate dependent objects for
>> auto revalidation. (No more need to tear down the object stack)
>> * implicit casting.
>> DB2 appears to be the only DBMS that implements SQL standard strict
>> typing...
>> anything from improving NULL, and parameter marker handling to
>> allowing comparisons between strings and numbers or concatenation of
>> strings and numbers: 'Hello' || 5 => 'Hello5'
>> * SQL Standard ARRAY type
>> * Some sort of "global" variable
>> * Some sort of "context" (like a login-script)
>> * Strengthening the concept of a schema
>> (or introducing SQL standard MODULES)
>> * "optimistic locking"
>> * Expose physical ROWID
>> * CS isolation without readers blocking writers (and vice versa)
>> * Snapshot Isolation
>> * SQL PL outside of procedures
>> (generalizing the BEGIN ATOMIC.. END)
>> * INTERVAL data type
>> * Informix style DATETIME
>> DATE(MONTH TO DAY)
>> or TIME(HOUR TO MILLISOCOND)
>> * DECFLOAT data type (exact numeric floating point)
>> * BOOLEAN data type
>> * [VAR]BINARY data type
>> * A way to put a session/server into auto-commit and then support
>> explicit start transaction (perhaps nested)
>> * autonomous transactions
>> * Full SQL PL support in SQL functions
>> * Full SQL PL support in Triggers
>> * user defined aggregates
>> * _CREATE_ GLOBAL TEMPORARY TABLES (like DB2 zOS)
>> * TRUNCATE TABLE statement
>>
>> Well... one thing is for sure.. there is always work....

>
> You're right about that Serge! It's hard to picture DB2 ever being
> completely finished!
>
> I can think of at least one thing that ought to be added to this list, if it
> isn't already in Viper:
> * some way to debug Java stored procedures and UDFs in the debuggers of
> popular IDEs like Eclipse. I have never been able to the get IBM Integrated
> Debugger to work and have had to resort to writing lines to files to debug
> my code. That is not nearly as nice as using a modern debugger where I can
> step into statements and check variable values on the fly.

Done! Download the Developer Workbench (beta) of the Viper site. It will
support DB2 V8.2 as well as DB2 Viper. Presently the beast weighs in a
tad heavy (with its own Eclipse and JRE), but I'm in good spirits you
will be able to plug it into your existing Eclipse IDE before long.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-27-2008, 08:06 AM
Mehmet Baserdem
 
Posts: n/a
Default Re: A dream of more functional CLP in v8.3

Serge,

I would love to have more Perl-ish "Regular Expressions" seasoning on
"LIKE" predicate:

-ignoring Upper / Lower cases ( Although I am not sure it is currently
doable with other means)
-using metacharacters (i.e. "\d" for digits)
-specifying range of values [a-x]
-using alternative phrases/groups in parentheses in the same pattern
text
-you name it.

Although it is possible to code Stored Procedures in VS.NET-2005 with
Viper, my ultimate dream: coding stored procedures with perl scritps.

Regards,

Mehmet

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-27-2008, 08:06 AM
Serge Rielau
 
Posts: n/a
Default Re: A dream of more functional CLP in v8.3

Mehmet Baserdem wrote:
> Serge,
>
> I would love to have more Perl-ish "Regular Expressions" seasoning on
> "LIKE" predicate:
>
> -ignoring Upper / Lower cases ( Although I am not sure it is currently
> doable with other means)

I think collation deserves to be separated out. This is beyond LIKE.

> -using metacharacters (i.e. "\d" for digits)
> -specifying range of values [a-x]
> -using alternative phrases/groups in parentheses in the same pattern
> text
> -you name it.

I wonder whether there is some open source code that can be recycled
into a UDF. I mean reg-exp matching is not new...
>
> Although it is possible to code Stored Procedures in VS.NET-2005 with
> Viper, my ultimate dream: coding stored procedures with perl scritps.

OK that's a new one. Need to be careful though.. next comes PHP, REXX...
Do you need PERL for PERL's sake or is SQL PL missing something?

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-27-2008, 08:06 AM
Mehmet Baserdem
 
Posts: n/a
Default Re: A dream of more functional CLP in v8.3

Serge,

I don't have a concrete comparison in terms of functionalty but it
would be nice to be able to use data structures like Hash and built-in
text processing functions.

Regards,

Mehmet Baserdem

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-27-2008, 08:06 AM
Mehmet Baserdem
 
Posts: n/a
Default Re: A dream of more functional CLP in v8.3

Serge,

Although it may seem not a good practice but when referring to columns
in the stmts, allowing for the use of column numbers instead of their
names might give an extra convenience to the developers who are dealing
with text files.

select columns [1] from some_function_returns_a_table()

Regards,

Mehmet Baserdem

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:05 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com