View previous topic :: View next topic
|
Author |
Message |
kotesh
New User
Joined: 11 May 2005 Posts: 20
|
|
|
|
SQLCODE IS -311SQLSTATE IS
DSNT408I SQLCODE = -311, ERROR: THE LENGTH OF INPUT HOST VARIABLE
NUMBER 13 IS NEGATIVE OR GREATER THAN THE MAXIMUM
DSNT418I SQLSTATE = 22501 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNXRIHB SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = -188 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'FFFFFF44' X'00000000' X'00000000'
how to resove this ,I have 10 columns in my talble |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
kotesh wrote: |
SQLCODE IS -311SQLSTATE IS
DSNT408I SQLCODE = -311, ERROR: THE LENGTH OF INPUT HOST VARIABLE
NUMBER 13 IS NEGATIVE OR GREATER THAN THE MAXIMUM
DSNT418I SQLSTATE = 22501 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNXRIHB SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = -188 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'FFFFFF44' X'00000000' X'00000000'
how to resove this ,I have 10 columns in my talble |
The error is self explanatory...
Code: |
-311 THE LENGTH OF INPUT HOST VARIABLE NUMBER position-number IS
NEGATIVE OR GREATER THAN THE MAXIMUM
Explanation: When evaluated, the length specification for input host
string variable, whose entry in the SQLDA is indicated by position-number,
was negative or greater than the maximum.
System Action: The statement cannot be executed.
[b]Programmer Response: Correct the program to ensure that the lengths of
all host string variables are not negative or that they are not greater
than the maximum allowed length. [/b]
SQLSTATE: 22501
|
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
kotesh,
1. you should know better than to piggy-back onto an old thread that has nothing to do with your question.
2. but, since this thread was about NULL-indicators, etc..
and you say that you only have 10 columns,
yet db2 told you that your 13th was incorrect,
I will guess
that your syntax is bad (if you are using NULL-Indicators).
but, since you did not bother to provide a CUT&PASTE with CODE tags
you can read about BBocde here
we have no idea what your problem is (with your SQL, anyway). |
|
Back to top |
|
|
kotesh
New User
Joined: 11 May 2005 Posts: 20
|
|
|
|
sorry I have 14 columns |
|
Back to top |
|
|
kotesh
New User
Joined: 11 May 2005 Posts: 20
|
|
|
|
INSERT INTO TFACB12_CBRS_ASSET
( INV_COMP_NUM
,INV_FUND_NUM
,INV_ACCT_NUM
,CONTROL_NUM
,CBRS_CNTL_NUM
,INV_DLR_NUM
,BIN_NUM
,PROCESS_DT
,FIRM_NUM
,IN_OUT_IND
,REJECT_CD
,REJ_RSN_DESC
,CBRS_ASSET_REC
,LAST_CHG_TMS )
VALUES
( :CB12-INV-COMP-NUM
,:CB12-INV-FUND-NUM
,:CB12-INV-ACCT-NUM
,:CB12-CONTROL-NUM
,:CB12-CBRS-CNTL-NUM
,:CB12-INV-DLR-NUM
,:CB12-BIN-NUM
,:CB12-PROCESS-DT
,:CB12-FIRM-NUM
,:CB12-IN-OUT-IND
,:CB12-REJECT-CD
,:CB12-REJ-RSN-DESC
,:CB12-CBRS-ASSET-REC
,CURRENT TIMESTAMP) |
|
Back to top |
|
|
kotesh
New User
Joined: 11 May 2005 Posts: 20
|
|
|
|
my file rec-length is BRSO-DATA-AREA-AT PIC X(1000).
and DB2 is CBRS_ASSET_REC VARCHAR(3000) |
|
Back to top |
|
|
kotesh
New User
Joined: 11 May 2005 Posts: 20
|
|
|
|
am waiting for your reply any luck??? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you are actually still asking what is wrong?
well,
the 13th column is CBRS_ASSET_REC
the 13th hostvar is CB12-CBRS_ASSET_REC
i would suggest that the picture definiton of CB12-CBRS_ASSET_REC
does not match that of the ddl definition of CBRS_ASSET_REC.
Quote: |
my file rec-length is BRSO-DATA-AREA-AT PIC X(1000). |
that makes no sense at all.
what does BRSO-DATA-AREA-AT have to do with CB12-CBRS_ASSET_REC?
since CBRS_ASSET_REC is varchar,
to what value are you setting the varchar length?
have no idea what your host-variable set-up is, but:
CB12-CBRS_ASSET_REC is probably a group item.
CB12-CBRS_ASSET_REC_LEN
and
CB12-CBRS_ASSET_REC_TEXT are probably lvl-49's under the group item.
I hope you are populating CB12-CBRS_ASSET_REC_TEXT
and not
CB12-CBRS_ASSET_REC
with the data
and you are populating CB12-CBRS_ASSET_REC_LEN
with the length of the data you are moving to CB12-CBRS_ASSET_REC_TEXT. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
am waiting for your reply any luck??? |
do not pester,
replying is on voluntary basis, free of charge
we reply when and if we feel like, not when You want
if You have time constraints a forum is not the best place to ask for help! |
|
Back to top |
|
|
wdba
New User
Joined: 24 Apr 2013 Posts: 1 Location: USA
|
|
|
|
Thanks dbzTHEdinosauer. Your answer just helped me as well. |
|
Back to top |
|
|
|