Topic
  • 4 replies
  • Latest Post - ‏2015-08-24T15:16:02Z by soulereclipse
soulereclipse
soulereclipse
20 Posts

Pinned topic View SQL in RDi

‏2014-08-25T12:48:54Z |

When attempting to generate DDL for some of the views on our v7.1 system, from within RDi, I only get the view definition part of the DDL not the SQL SELECT part.

 

We are running RDi v9.0.1.  From the Data Source Explorer view, I drill down to the schema/views folder.  If I select a view that has null in the QSYS2.SYSVIEWS.VIEW_DEFINITION column (I believe because the view is made up of more than 10000 characters) I have the problem stated above.  If the VIEW_DEFINITION column is not null, everything looks fine.  My problem is:

 

I know there is some other way to get the definition because I can still do it in Navigator with no problem (very frustrating).

I can't find anywhere in RDi documentation or anywhere else that tells me a way to configure a fix for what I am doing wrong (even more frustrating). 

 

If you could help me or point me in a better direction, I would be very grateful.  

  • krmilligan
    krmilligan
    450 Posts

    Re: View SQL in RDi

    ‏2014-08-25T15:08:35Z  

    Are you trying to generate view definitions for DB2 logical file objects?  While a logical file is conceptually like an SQL view, the Rational toolset doesn't have the ability to generate SQL for a logical file object since an LF is a proprietary DB2 for i feature.

     

    Probably need to use the Navigator Generate SQL support to generate a PC file into the Rdi Data Development Project folder.

     

     

  • soulereclipse
    soulereclipse
    20 Posts

    Re: View SQL in RDi

    ‏2014-08-25T18:45:33Z  

    Are you trying to generate view definitions for DB2 logical file objects?  While a logical file is conceptually like an SQL view, the Rational toolset doesn't have the ability to generate SQL for a logical file object since an LF is a proprietary DB2 for i feature.

     

    Probably need to use the Navigator Generate SQL support to generate a PC file into the Rdi Data Development Project folder.

     

     

    No sir.  The view was originally created from a .sql script file using Navigator and I have tried your idea.  I dropped the view completely.  Opened the .sql script file in RDi and performed the RDi Run SQL.  The script runs successfully without errors and the view is created.  After doing this:

     

    1)  There are still nulls in the QSYS2.SYSVIEWS.VIEW_DEFINITION column for the view.

    2)  When I perform the Generate DDL on the view, it only generates the CREATE VIEW ... AS part of the DDL.  

  • krmilligan
    krmilligan
    450 Posts

    Re: View SQL in RDi

    ‏2014-08-28T14:32:20Z  

    No sir.  The view was originally created from a .sql script file using Navigator and I have tried your idea.  I dropped the view completely.  Opened the .sql script file in RDi and performed the RDi Run SQL.  The script runs successfully without errors and the view is created.  After doing this:

     

    1)  There are still nulls in the QSYS2.SYSVIEWS.VIEW_DEFINITION column for the view.

    2)  When I perform the Generate DDL on the view, it only generates the CREATE VIEW ... AS part of the DDL.  

    We're asking internally if the code can be enhanced to use a different technique for generating view definitions.  In parallel, I'd suggest that you open a PMR with IBM Support and request an enhancement through that channel.

  • soulereclipse
    soulereclipse
    20 Posts

    Re: View SQL in RDi

    ‏2014-08-28T15:00:20Z  

    We're asking internally if the code can be enhanced to use a different technique for generating view definitions.  In parallel, I'd suggest that you open a PMR with IBM Support and request an enhancement through that channel.

    Very well.  Thank you Ken for looking into this and giving it your attention.  I will post any updates I get from IBM Support.