Why does DBRM static bind fail with SQLCODE=-134?

Document ID : KB000053667
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

SQLCODE -134,

Error:
IMPROPER USE OF LONG STRING COLUMN OR AN EXPRESSION OF MAXIMUM LENGTH GREATER THAN 255

Aion compile procedures convert Aion code into C code, and generates the DBRM of the program. DB2 Bind procedure gives SQLCODE=-134 error if string mode host-variables are defined without appropriate length because string mode is a just pointer for a string variable in the C language.

Windows IDE can run without the problem because Windows IDE runs Aion application dynamic SQL mode even "USE STATIC SQL" is checked.

 

Answer:

Please specify an appropriate length for string variables when the query class property is defined with "USE STATIC SQL".