Db2 Stage error

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
jayantthakore
Participant
Posts: 42
Joined: Tue Jan 18, 2005 5:48 am

Db2 Stage error

Post 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.
regards,
Jayant S Thakore
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply