1 Reply Latest reply: Jan 31, 2014 11:55 AM by malo0149 RSS

PROC Decode error

user8606939 Newbie
Currently Being Moderated

In the following code I get

CSF-S-00352, out of bounds bind position from PL/SQL

Error at line 31, column 2 in file test.pc

        EXEC SQL SELECT DECODE(:hdr_str, '0', :hdr_str, :hdr_str)

 

Any ideas?

 

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <cosl.h>
#include <cosl_report.h>

#include <cosl_list.h>


EXEC SQL INCLUDE SQLCA;

/******************************************************************************\
* MAIN                                                                         *
\******************************************************************************/
main (int argc, char **argv)
{
        EXEC SQL BEGIN DECLARE SECTION;

                varchar hdr_str[200];
        EXEC SQL END DECLARE SECTION;

 

        hdr_str.len = 200;

 

        EXEC SQL SELECT DECODE(:hdr_str, '0', :hdr_str, :hdr_str)
                         INTO :hdr_str from dual;

}

  • 1. Re: PROC Decode error
    malo0149 Newbie
    Currently Being Moderated

    What db version are you using? I'm running into this same error for similar code on 11.2.0.4, but it compiles fine on 11.2.0.3 and 12.1.0.

     

    Haven't figured out a solution yet, but if it turns out to be a bug in this db version, I'll post a follow up.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points