Link to home
Start Free TrialLog in
Avatar of devtha
devthaFlag for United States of America

asked on

Error building a Stored Procedure

Hello all I am new to this environment and in process of creating the following procedure.
I am getting errors could some one help me.
Thanks

CREATE PROCEDURE SESS.GETDATA ( IN SESSID varchar(50),
                                   IN KEYNAME varchar(50),
                                   IN OPERATION varchar(50),
                                   IN L_EVENT varchar(50),
                                   IN PARENTKEY varchar(50) )
    SPECIFIC SESS.GETDATA
    DYNAMIC RESULT SETS 1
    LANGUAGE SQL

P1: BEGIN
    -- Declare cursor
    DECLARE cursor1 CURSOR WITH RETURN TO CALLER FOR
        SELECT KEY_VAL
        FROM SESS.SESSION;

    -- Cursor left open for client application
    OPEN cursor1;

END P1


when i use SPB, it's giving me SQL091N The SQL Statement failed because of a
non-severe system error.  Subsequent statements can be processed (Reason "Error while generating C source code".)
SQLSTATE = 58004
It was giving me a different error if I use Command Center
ASKER CERTIFIED SOLUTION
Avatar of BigSchmuh
BigSchmuh
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of devtha

ASKER

I am not the admin for this server. Perhaps it is a DBA task.
I can ask the DBA to check it for me.
Have you tried creating the sp in your environment?
 
I guess "Error while generating C source code" does not need to be checked on my environment and I don't have one at the moment...
==> But the problem is always the same, caming from Oracle and MsSql I was used to be able to compile my sp directly on the dbms, but DB2 needs a C compiler and some environment variables setted to compile correctly

I guess asking the DBA is a good idea