ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

stored proc returning result set

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • stored proc returning result set

    hi experts,

    i'm new to db2....n having a problem pre-compiling this sample code from ibm site...



    the problem is in begin declare section .....

    ************************************************** ***************
    EXEC SQL BEGIN DECLARE SECTION;
    double inMedianSalary=0;
    sqlint16 nullind;
    char name[256],
    job[256];
    float salary;


    line 87 : static volatile SQL TYPE IS RESULT_SET_LOCATOR *loc1, *loc2,*loc3;

    struct sqlda *proc_da;
    /* SQLDA for DESCRIBE PROCEDURE */
    struct sqlda *res_da;
    /* SQLDA for DESCRIBE CURSOR *


    EXEC SQL END DECLARE SECTION;

    ************************************************** **************
    the precomplier says......

    87 SQL0008N The token "*" found in a host variable
    declaration is not valid.
    139 SQL4911N The host variable data type is not valid.
    SQL0095N No bind file was created because of previous


    (same for all the three pointer variables....)

    help me ....if u know what might be wrong...i checked syntax in various documents...it seems right to me....
    thanks in advance.....

  • #2
    Re: stored proc returning result set

    This is a stored procedure built for z/OS not for iSeries.
    Last edited by Mercury; February 24, 2008, 05:49 AM.
    Philippe

    Comment

    Working...
    X