Page 1 of 1

Getting -84 SQLCODE during pre-compilation of CICS DB2 pgm

PostPosted: Mon Feb 22, 2010 1:16 pm
by chaitrasmurthy
Hi,

I am using 2 tables in my CICS DB2 program (2 DCLGENs) using INCLUDE statement. I got -84 SQLCODE during precompilation for the second INCLUDE statement. I had maintained same name for 2 columns in both tables. Made it unique thinking that would be the problem. This time, I dint get -84 error for INCLUDE statement, instead I could see that for the SELECT query of second table. Syntax for SQL statements are perfect. But not sure about this error. It would be of great help if anyone can help me out.
Here's -84 SQLCODE description:

UNACCEPTABLE SQL STATEMENT
Explanation: The referenced SQL statement is not allowed in this situation, but it will not cause an error.
Depending on the option specified at precompile time, one of the following occurred.
v The BEGIN DECLARE SECTION(*), END DECLARE SECTION(*), and UPDATE STATISTICS statements are flagged as not compatible.
* For C applications, BEGIN and END DECLARE SECTION are not flagged.
* For other languages, the statement is only allowed with precompiler option STDSQL(YES).
v Using the STDSQL(YES) precompiler option, the INCLUDE SQLCA statement is flagged as a warning.
Severity: 4 (warning)
System Action: The BEGIN DECLARE SECTION, END DECLARE SECTION, and INCLUDE SQLCA statements are ignored. The other statements are replaced by host language statements that will, if executed, set a warning code or SQLCODE -84 in the
SQLCA.
User Response: Unless this application program is used in a portable manner, remove the statement.

Re: Getting -84 SQLCODE during pre-compilation of CICS DB2 pgm

PostPosted: Mon Feb 22, 2010 1:38 pm
by dick scherrer
Hello and welcome to the forum,

For someone to be able to help, you need to post the expanded problem code.

Re: Getting -84 SQLCODE during pre-compilation of CICS DB2 pgm

PostPosted: Mon Feb 22, 2010 2:13 pm
by chaitrasmurthy
Hi,

I can only see the following error in compilation listing after the SELECT statement.

MOVE -84 TO SQLCODE.
MOVE "42612" TO SQLSTATE.

However I see the return code of pre-compilation as '0' and bind for the program is also successful. But, when I actually check the flow of the program using CEMT, the SELECT statement doesnt get executed at all.

Re: Getting -84 SQLCODE during pre-compilation of CICS DB2 pgm

PostPosted: Mon Feb 22, 2010 2:54 pm
by chaitrasmurthy
Or as one solution to the above problem mentioned in the error description, I can set STDSQL pre-compiler option to 'YES'. Can anyone suggest me how do I set this precompiler option?