Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    186

    Unanswered: Stored procedure compile errror

    I am trying to compile a store procedure in DB2 V8, Fixpak 5, on AIX 5.2. Any ideals would be appreciated. I can compile other C programs with no problem, just not a stored procedured. I have added the I am getting the following:
    I added the following to my profile
    DB2_SQLROUTINE_COMPILE_COMMAND=xlc -I$HOME/sqllib/include SQLROUTINE_FILENAME.c -bEQLROUTINE_FILENAME.exp -e pgsjmp -o SQLROUTINE_FILENAME -L$HOME/sqllib/lib -ldb2


    -- COMPILATION MESSAGES FOR /db2/EOP/sqllib/function/routine/sqlproc/PEDWETL/ETL/tmp/P3450980.c
    sh: xlC_r: not found.

    -- END OF LOG FILE (SQLCODE: -7032)
    ETL.SP_GET_THRESH - Build failed.
    ETL.SP_GET_THRESH - Roll back completed successfully.

    The body of the stored proc is as follows:

    CREATE PROCEDURE INFORMAT.SP_GET_THRESH(OUT CNT1 INTEGER)
    MODIFIES SQL DATA
    NOT DETERMINISTIC
    LANGUAGE SQL
    BEGIN
    select count(*) into CNT1 from etl_process_control where WF_STAT='R';
    END
    David Quigley

  2. #2
    Join Date
    Sep 2003
    Posts
    237
    our profile reads(relevant lines only)
    db2inst1>db2set -all
    [i] DB2_SQLROUTINE_COMPILER_PATH=/home/db2inst1/sqllib/function/routine/sr_cpath
    [i] DB2_SQLROUTINE_COMPILE_COMMAND=/usr/vac/bin/xlc -H512 -T512 -g -I/crmdbhome/01/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -bEQLROUTINE_FILENAME.exp -e
    SQLROUTINE_ENTRY -o SQLROUTINE_FILENAME -L/crmdbhome/01/db2inst1/sqllib/lib -lc-ldb2

    vaguely remember checking entries in a file in compiler path; xlc in our case is in /usr/vac/bin/ ;
    mota

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •