IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 2 replies
  • Latest Post - ‏2013-12-04T16:18:11Z by X76S_Vito_Mattera
carlolunghi
carlolunghi
11 Posts

Pinned topic Problem in Stored Procedure Definition

‏2013-11-28T10:44:53Z |

Dear Colleagues,

We have this problem in a Stored Procedure Definition.  We use DataStudio version 4.1 and DB2 Expc 10.1 on Linux.  When working in Data Model Editor, we want to introduce a stored procedure with @ as terminator, for instance this code:

CREATE PROCEDURE SP1 (IN P1 VARCHAR(255))

P1: BEGIN

--- Instructions


END P1

@

P1 is not actualized in the parameter tab, and here we do not succeed into defining P1 varchar value 255.
Only value 1 is admitted. Is it a known limit or are we doing a mistake ?
Then we generate DDL with Drop Check Box selected

--<ScriptOptions statementTerminator="@"/>

DROP PROCEDURE "TIPIDATI"."SP1"(VARCHAR(1))@

CREATE PROCEDURE SP1 (IN P1 VARCHAR(255))
P1: BEGIN

--- Instructions


END P1

@

The drop statment will produce an error due to the impossibility to find a stored with the same exactly defined parameter.
Actually we have to manually correct the DDL file before to run it.

Have anybody a comment on such a behaviour ?

Thanks for the cooperation, best regards.

c.l.

  • David_Zhu
    David_Zhu
    15 Posts

    Re: Problem in Stored Procedure Definition

    ‏2013-12-03T12:23:28Z  

    Hi,Carlolunghi,

    Could you describe you steps how to recreate you problems scuh as where you create the model and where you start to drop the routine which can help us quicly diagnose the problem? It is better you can provide several pictuares about your steps.

     

    Thanks.

  • X76S_Vito_Mattera
    X76S_Vito_Mattera
    1 Post

    Re: Problem in Stored Procedure Definition

    ‏2013-12-04T16:18:11Z  
    • David_Zhu
    • ‏2013-12-03T12:23:28Z

    Hi,Carlolunghi,

    Could you describe you steps how to recreate you problems scuh as where you create the model and where you start to drop the routine which can help us quicly diagnose the problem? It is better you can provide several pictuares about your steps.

     

    Thanks.

    Hi Zhu,

    I'm sending you some picture to describe better.

    In the picture 1 you see the interface from the Modeling Perspective used to define the SP1

    In the picture 2 you see the inserted code

    In the picture 3 you see the variable definition withe impossibility to define the right lengh of the VARCHAR ! Only value 1 is allowed

    In the picture 4 you see the DDL generated by Data Studio.

    Hoping this could clarify our troble.

    Thank in advance

    Vito 

     

    Attachments