Page 1 of 1

Db2 Stage error

Posted: Tue Feb 07, 2006 4:53 am
by jayantthakore
I am gettin this fatal error in my Job when i m tring to load in Db2 Enterprise Stage.
DB2 Driver Embedded SQL message: SQL0311N The length of string host variable number "3" is negative or greater
than the maximum. SQLSTATE=22501
;
sqlcode = -311;
sqlstate = 22501
Execute failed.

just a info : The load is successful in API stage.

Posted: Tue Feb 07, 2006 5:35 am
by Eric
DB2 Docs
SQL0311N The length of string host variable number var-number is negative or greater than the maximum.
Explanation:
When evaluated, the length specification for the string host variable, whose entry in the SQLDA is indicated by <var-number> (based at 1), was negative or greater than the maximum defined for that host variable.

The statement cannot be processed.

User Response:
Correct the program to ensure that the lengths of all string host variables are not negative or that they are not greater than the maximum allowed length.

sqlcode: -311

sqlstate: 22501

Posted: Tue Feb 07, 2006 2:20 pm
by ray.wurlod
Did you change the length attribute of any VarChar (string [max=n]) column? If not, report the bug through your service provider.