Bind Sql Error Plan Not Applicable
Contents |
Technote (FAQ) Question SQLCODE -206 returned on the BIND of a statement in a COBOL program. The statement executes okay from SPUFI. All columns names referenced in the SQL statement exist in the table. The tablespace the table
Sqlcode=-206 Sqlstate=42703 In Db2
is in is not in any PENDING status. Cause This indicates a problem with the delimiters within db2 bind error 805 SQL statements defined -- the delimiter for a character string literal versus the escape character used to delimit a column name. Answer Check whether
Sqlcode 206 In Bind
the QUOTESQL or APOSTSQL precompiler options were specified, and the setting for SQLDELI in your DSNHDECP. Here is an example of an SQL statement in the COBOL application program: UPDATE HOURS.RPTREQS SET STATUSCD = 'C' WHERE STATUSCD = 'W' Here com.ibm.db2.jcc.am.sqlsyntaxerrorexception: db2 sql error: sqlcode=-206, sqlstate=42703 is the error message from the BIND output: DSNX105I -DB2P BIND SQL WARNING USING CON01 AUTHORITY PLAN=(NOT APPLICABLE) sqlcode=-727, sqlstate=56098 DBRM=FBHRBILC STATEMENT=1478 SQLCODE=-206 SQLSTATE=42703 TOKENS=W Note: The message token is W. DB2 thinks what you have in single quotes is a column name. You did not specify either the QUOTESQL or the APOSTSQL precompiler option. When those are not provided, SQLDELI from your DSNHDECP is used. If SQLDELI is DEFAULT or QUOTE, then the double quote is used as the delimiter for character strings within SQL statements, and the single quote is used as the escape character for column names, as in this example. As to why the SPUFI behavior is different from the COBOL behavior, the SQL Reference says: In a non-COBOL program, the string delimiter is the apostrophe, and the escape character is the quotation mark. The APOST/QUOTE precompiler options and the DELIM setting in the DECP are used only to determine the character string delimiter for host language statements (not for embedded SQL statements in a host program). The options that are important for the example above are the APOSTSQL/QUOTESQL precompiler options and the SQLDELI setting in DSNHDECP, since the statement is an
UNSUCCESSFUL BIND FOR PACKAGE ADBL.ADBCSRV z/os A fix is available Obtain the fix for this APAR.
Sqlcode=-203, Sqlstate=42702
Subscribe You can track all active APARs for this component. APAR sqlcode=-117 status Closed as program error. Error description The DB2 Administration Tool for z/OS install process can
Is Not Valid In The Context Where It Is Used.. Sqlcode=-206, Sqlstate=42703
result in SQLCODEN206 / SQLCODE -206 BIND errors for the Change Management feature related package ADBL MEMBER(ADBCSRV). Local fix Add these 3 Alters to the SAMP member http://www.ibm.com/support/docview.wss?uid=swg21114945 ADBCHANU. ALTER TABLE ADBCHG ADD APPCONT CHAR(1) NOT NULL WITH DEFAULT; ALTER TABLE ADBCHG ADD IDENTSVL CHAR(1) NOT NULL WITH DEFAULT; ALTER TABLE ADBCHG ADD SEQSVLR CHAR(1) NOT NULL WITH DEFAULT; Problem summary **************************************************************** * USERS AFFECTED: Users of the DB2 Administration Tool and * * IBM Tools Customizer (TCz) for z/OS. * **************************************************************** http://www-01.ibm.com/support/docview.wss?uid=swg1PM85491 * PROBLEM DESCRIPTION: When upgrading the Change Management * * Database from DB2 Administration Tool * * for z/OS Version 7.2 to Version 10.2, * * the following BIND error will occur * * when submitting job ADBBIND: * * * * BIND PACKAGE(ADBL) - * * MEMBER(ADBCSRV) - * * QUALIFIER(DB2PROG) - * * VALIDATE(BIND) - * * ISOLATION(CS) - * * RELEASE(C) - * * ENCODING(EBCDIC) - * * EXPLAIN(NO) * * * * DSNX200I -DB2M BIND SQL ERROR * * USING UTIL0 AUTHORITY * * PLAN=(NOT APPLICABLE) * * DBRM=ADBCSRV * * STATEMENT=872 * * SQLCODE=-206 * * SQLSTATE=42703 * * TOKENS=APPCONT * * CSECT NAME=DSNXORSO * * RDS CODE=-100 * * DSNT233I -DB2M UNSUCCESSFUL BIND FOR * * PACKAGE = * * DB2M.ADBL.ADBCSRV.(V10.2.0.0000000) * **************************************************************** * RECOMMENDATION: * **************************************************************** This BIND error was due to 3 missing columns to the Change Management Database ADBCHG: APPCONT IDENTSVL SEQSVLR Problem conclusion Problem has been resolved. Submit SAMP li
or Version 10 conversion mode Technote (FAQ) Question We encountered an issue with a SQL statement in Version 9 (or Version 10) that did http://www.ibm.com/support/docview.wss?uid=swg21322024 not occur in Version 8. In Version 8, the following SQL statement was valid when coded within parentheses: EXEC SQL (SELECT COUNT(*) INTO :WS-NONREG-PEND-COUNT FROM MAMT_NONREG_SVC WHERE MEMBER_ID_TD = :MPLST-MEMBER-ID-TD AND https://bytes.com/topic/db2/answers/180973-805-error STATUS IN ('B', 'C', 'D') AND DELETE_IND = 'N') END-EXEC. However, in Version 9 (or Version 10) we see the following bind error: DSNX200I -DB27 BIND SQL ERROR USING DBA AUTHORITY PLAN=(NOT sql error APPLICABLE) DBRM=MBRPD470 STATEMENT=4407 SQLCODE=-109 SQLSTATE=42601 TOKENS=INTO CSECT NAME=DSNHSM1 RDS CODE=44 DSNX200I -DB27 BIND SQL ERROR USING DBA AUTHORITY PLAN=(NOT APPLICABLE) DBRM=MBRPD470 STATEMENT=4429 SQLCODE=-109 SQLSTATE=42601 TOKENS=INTO CSECT NAME=DSNHSM1 RDS CODE=44 DSNT233I -DB27 UNSUCCESSFUL BIND FOR PACKAGE = DB27LOC.SAVCOLL.MBRPD470.() Or message DSNH109I as a symptom for the same invalid syntax when using the precompiler. Answer Internal users discovered that the INTO clause was being allowed bind sql error in a SELECT statement when it should not have been. The problem was fixed in the DB2 9 for z/OS code. However, the documentation was not changed for Version 9, because the syntax has not changed. In fact, invalid syntax was being allowed in Version 8, which resulted in some incorrect results. Customers who perform a skip release migration from Version 8 to Version 10 may also encounter this in Version 10 conversion mode. The syntax diagram for the SELECT INTO statement shows that the statement must begin with select-clause, and shows that the first token must be the keyword SELECT; it cannot be preceded by a left parenthesis. The statement should work if you remove the outer parentheses. Also, the INTO clause might not be used if the SELECT is in a scalar fullselect. Related information SELECT INTO Document information More support for: DB2 for z/OS RDS Software version: 9.1, 10.0 Operating system(s): z/OS Reference #: 1322024 Modified date: 2013-04-08 Site availability Site assistance Contact and feedback Need support? Submit feedback to IBM Support 1-800-IBM-7378 (USA) Directory of worldwide contacts Contact Privacy Terms of use Accessibility
& solutions from a community of 418,437 IT Pros & Developers. It's quick & easy. -805 Error P: n/a Ali Binding error < SQLSTATE = 51002, SQLCODE = -000000805 >. < DSNT408I SQLCODE = -805, ERROR: DBRM OR PACKAGE NAME DBD2SYSTEM..SB0A0Q00.174 < PLAN CGEY001D. REASON 03 >. < DSNT418I SQLSTATE = 51002 SQLSTATE RETURN CODE >. < DSNT415I SQLERRP = DSNXEPM SQL PROCEDURE DETECTING ERROR >. < DSNT416I SQLERRD = -250 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION >. < DSNT416I SQLERRD = X'FFFFFF06' X'00000000' X'00000000' X'FFFFFFFF' X'00000000 < DIAGNOSTIC INFORMATION >. DSNX200I =DD21 BIND SQL ERROR USING SS3MDU02 AUTHORITY PLAN=(NOT APPLICABLE) DBRM=SB0A0Q00 STATEMENT=675 SQLCODE=-401 SQLSTATE=42818 TOKENS= CSECT NAME=DSNXOBFC RDS CODE=930 DSNT233I =DD21 UNSUCCESSFUL BIND FOR PACKAGE = DBD2SYSTEM.SS3MDU02.SB0A0Q00.() Any ideas would be much appreciated. A Nov 12 '05 #1 Post Reply Share this Question 2 Replies P: n/a Mark A "Ali"