sqlcode -276 received using DBSQLPR

Document ID : KB000124567
Last Modified Date : 15/01/2019
Show Technical Document Details
Question:
i received the following error when using DBSQLPR:

-276 - SQLDA SPECIFIES n FEWER HOST VARIABLES THAN IN STATEMENT 
                                                                
Environment:
z/os, CA Datacom/SQL 15.0
Answer:
DBSQLPR does not support Host Variables.


In the specific case, customer execute under DBSQLPR:

SELECT....
....WHERE....
AND PVDISTVNDR1_."DIST"=? 
AND PVDISTVNDR1_."PROD_NBR"=? AND ..... 
..... 

and receiving error:
SQLCODE = -276, SQLSTATE=53S35 
MESSAGE = SQLDA SPECIFIES 2 FEWER HOST VARIABLES THAN IN STATEMENT
Additional Information:
-276 - SQLDA SPECIFIES n FEWER HOST VARIABLES THAN IN STATEMENT 

Explanation:                                                            
                                                                       
      The number of input host variables and SQLDA entries is different. 
                                                                         
      The SQLSTATE that equates to this SQL return code is 53S35.       

User response:

The system interfacing between your program and the Multi-User Facility (DQ,    
DDOL, IDEAL, SQL, SQL COBOL Preprocessor, and so on) is responsible for sending 
SQLDA with the same number of host variables as declared at bind-time.  However,
you may have executed an old version of your program.  Check to ensure the      
program is linked into the proper library and if it is executing from CICS, that the
new version is being executed.