Implementing DB2 Properties...Name & Remarks

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Implementing DB2 Properties...Name & Remarks

oplink
Im not sure if im missing something or if the following is an issue. It seems the DB2 Plugin does not reconize a few

driver properties :



DB2 Plugin does not consider the option selection 'System" for the Driver Properties "naming". DB2 Plugin will always use the SQL dot notation for naming files regardless of the 'naming' selection. (this is not on statements entered in the SQL editor but rather the plugin itself)

 

Example:   in the UDFParentExpander.java the FROM file in the SELECT statement will always us the dot notation  ".SYSIBM.SYSFUNCTIONS..."  regardless of the naming convention selected in the Driver Properties. If I were to select the "System" as the naming convention I can use the standard i5/OS forward slash, "/" instead of the dot notation for SQL statements. In addition, using the 'System" properties will allow the searching of a library list to go into effect.

 

To reproduce this error:

Select the "IBM DB2 App Driver" then select "Properties", then "Driver properties" tab.

>From the "driver properties"  check off "Use driver properties'

Then select "System" for the "naming' properties.

Then select OK



After setting up the driver properties execute the driver and then  from the objects tree select a library folder then double click UDF.

The following message should appear:

Error: UDF: java.sql.SQLException: [SQL5016] Qualified object name SYSFUNCS not valid.

-----

There is also a nice feature in the Driver Properties called "Remarks". This will allow the use of the remarks as a column name instead of the field name. This remark information is the actual expanded text info of the field name defined in DDS on the i5/OS.

This feature does not seem to work.



thanks

joe mcdonald




-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Squirrel-sql-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-develop
Reply | Threaded
Open this post in threaded view
|

Re: Implementing DB2 Properties...Name & Remarks

Robert Manning
Hi Joe,

See my responses below.

On Mon, Apr 28, 2008 at 8:57 PM, oplink <[hidden email]> wrote:

> Im not sure if im missing something or if the following is an issue. It seems the DB2 Plugin does not reconize a few
>
>  driver properties :
>
>
>
>  DB2 Plugin does not consider the option selection 'System" for the Driver Properties "naming". DB2 Plugin will always use the SQL dot notation for naming files regardless of the 'naming' selection. (this is not on statements entered in the SQL editor but rather the plugin itself)
>
>
>
>  Example:   in the UDFParentExpander.java the FROM file in the SELECT statement will always us the dot notation  ".SYSIBM.SYSFUNCTIONS..."  regardless of the naming convention selected in the Driver Properties. If I were to select the "System" as the naming convention I can use the standard i5/OS forward slash, "/" instead of the dot notation for SQL statements. In addition, using the 'System" properties will allow the searching of a library list to go into effect.
>
>
>
>  To reproduce this error:
>
>  Select the "IBM DB2 App Driver" then select "Properties", then "Driver properties" tab.
>
>  >From the "driver properties"  check off "Use driver properties'
>
>  Then select "System" for the "naming' properties.
>
>  Then select OK

The DB2 Plugin was developed against DB2 LUW (and support for OS/400
added with help from others).  The "IBM DB2 JDBC Universal Driver"
that I use to connect to LUW doesn't allow you to specify a "System"
property, so I am not able to see this behavior.  Would it be solved
by simply detecting the system property you mentioned and then
re-phrasing the SQL with "/" instead of "." in the table identifiers?
Do table aliases work the same way in this case?

>
>  There is also a nice feature in the Driver Properties called "Remarks". This will allow the use of the remarks as a column name instead of the field name. This remark information is the actual expanded text info of the field name defined in DDS on the i5/OS.
>
>  This feature does not seem to work.

Again, my driver doesn't seem to support this property.  When you say
doesn't work, I assume you mean that you execute some SQL in the
editor and it fails when using column remarks instead of the column
name - even though the property is set?  It appears as though that
setting might be ignored by the driver?


Rob

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Squirrel-sql-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-develop
Reply | Threaded
Open this post in threaded view
|

Re: Implementing DB2 Properties...Name & Remarks

Robert Manning
On Tue, Apr 29, 2008 at 11:06 PM, OPLink <[hidden email]> wrote:

> Robert,
>
>  > The DB2 Plugin was developed against DB2 LUW (andsupport for OS/400
>
> > added with help from others).  The "IBM DB2 JDBC Universal Driver"
>  > that I use to connect to LUW doesn't allow you to specify a "System"
>  > property, so I am not able to see this behavior.  Would it be solved
>  > by simply detecting the system property you mentioned and then
>  > re-phrasing the SQL with "/" instead of "." in the table identifiers?
>  > Do table aliases work the same way in this case?
>  Yes it seems the DB2 Plugin will work if it could detect the naming
>  convention selected on the driver properties
>  and then switch to that notation, in this case from SQL to System or '.' to
>  '/'. I tried changing the plugin myself
>  I was able to get rid of the message but then nothing would display if
>  double click on the UDF folder where I am
>  able to display the functions in that folder if I use the SQL notation.
>  However it may be my end as I did not
>  take my time on it. I will attempt again this week. Aliases files should
>  work the exact same way with members or no members.

Ok, let me know if there is anything I can do to help.  If you have a patch
that works, I'd happy to apply it for you in CVS.

>  ----------------
>
>
>  > Again, my driver doesn't seem to support this property.  When you say
>  > doesn't work, I assume you mean that you execute some SQL in the
>  > editor and it fails when using column remarks instead of the column
>  > name - even though the property is set?  It appears as though that
>  > setting might be ignored by the driver?
>  The SQL does not fail it excutes fine, however, it will always display the
>  Column-Name(field name) and not the Remarks(full length text) regardless of
>  the properties setting for Remarks. The Remarks setting gives me a choice of
>  'sql' or 'system' I would think the Remarks data would be displayed for
>  heading if selected 'system'.
>  --------------
>  To re-phrase:
>  --------------
>  When I double click a file from the object tree I can display the right
>  pane. From there - in the 'column' tab you will find both the COLUMN_NAME
>  and  REMARKS. It would be great if SQL could display the REMARKS in place of
>  the COLUMN_NAME based on the driver properties setting for Remarks. But
>  maybe thats not the DB2 Plugin's responsibility ?

I would think that the driver would be responsible for making the
switch, given that
it's a driver property.  We use the metadata that we get from JDBC, so
I would think
it would be easy for someone to write a small test that shows that the
driver doesn't
do this and then perhaps submit it as a bug to the DB2 support people.
 We don't
have APIs for the plugin to make this switch in every place that
column names would
appear.

Rob

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Squirrel-sql-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-develop