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
LVL 6
devthaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BigSchmuhCommented:
DB2 needs a C Compiler installed on the SERVER for it to compile your stored procedures...
Better get a close look at the "Application Building Guide" (v7 release below) chapter 5-Building SQL procedures/Setting the SQL environment
   ftp://ftp.software.ibm.com/ps/products/db2/info/vr7/pdf/letter/db2axe71.pdf

Hope this helps.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
devthaAuthor Commented:
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?
 
0
BigSchmuhCommented:
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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB2

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.