Forum Stats

  • 3,874,115 Users
  • 2,266,686 Discussions
  • 7,911,730 Comments

Discussions

PROC Decode error

user8606939
user8606939 Member Posts: 5 Red Ribbon
edited Jan 31, 2014 2:55PM in Oracle Call Interface (OCI)

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;

}

Answers

  • 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.

This discussion has been closed.