Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sqlcode -301 when Invoking Stored Procedue

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
pinomaiulis

New User


Joined: 08 May 2006
Posts: 6
Location: Italy

PostPosted: Wed Mar 07, 2007 8:31 pm    Post subject: Sqlcode -301 when Invoking Stored Procedue
Reply with quote

Invoking Stored Procedue.
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Mar 07, 2007 8:33 pm    Post subject: Re: Sqlcode -301
Reply with quote

pinomaiulis wrote:
Invoking Stored Procedue.
That's all the information we get?
Back to top
View user's profile Send private message
pinomaiulis

New User


Joined: 08 May 2006
Posts: 6
Location: Italy

PostPosted: Wed Mar 07, 2007 8:34 pm    Post subject: Re: Sqlcode -301
Reply with quote

William Thompson wrote:
pinomaiulis wrote:
Invoking Stored Procedue.
That's all the information we get?


This is the error log:

2007-03-06 11:06:23,649 [4336] INFO-StoreProcedureStart ------"DGR0131"------
2007-03-06 11:06:23,680 [4336] INFO-1) IN IN_MATRICOLA Int32(0) '3495452'
2007-03-06 11:06:23,680 [4336] INFO-2) IN IN_TY_OPE String(1) 'U'
2007-03-06 11:06:23,680 [4336] INFO-3) IN IN_CD_ABI Int32(0) '3163'
2007-03-06 11:06:23,680 [4336] INFO-4) IN IN_PG_PREMIO String(26) '2007-02-19-16.02.02.253785'
2007-03-06 11:06:23,680 [4336] INFO-5) IN IN_PG_OPEN_SERIAL Int32(0) '6208871'
2007-03-06 11:06:23,680 [4336] INFO-6) IN IN_DOSSIER String(11) '10000'
2007-03-06 11:06:23,680 [4336] INFO-7) IN IN_SOTTO_DOSSIER String(5) '0'
2007-03-06 11:06:23,680 [4336] INFO-8) IN IN_LABEL_MUREX String(20) 'TELECOM IT RNC '
2007-03-06 11:06:23,680 [4336] INFO-9) IN IN_IM_YDAY_VALUE String(20) '1585817.14'
2007-03-06 11:06:23,680 [4336] INFO-10) IN IN_IM_YDAY_PRICE String(20) '0'
2007-03-06 11:06:23,680 [4336] INFO-11) IN IN_CD_ISIN_FT String(12) ' '
2007-03-06 11:06:23,680 [4336] INFO-12) IN IN_CD_ISIN_OPT String(12) ' '
2007-03-06 11:06:23,680 [4336] INFO-13) IN IN_CD_ISIN_UNDER String(12) 'IT0003497176'
2007-03-06 11:06:23,680 [4336] INFO-14) IN IN_CD_CAUSALE String(4) 'DESL'
2007-03-06 11:06:23,680 [4336] INFO-15) IN IN_CD_DIVISA String(3) 'EUR'
2007-03-06 11:06:23,680 [4336] INFO-16) IN IN_STATUS_MOV String(1) 'C'
2007-03-06 11:06:23,680 [4336] INFO-17) IN IN_INV_CAD String(1) 'N'
2007-03-06 11:06:23,680 [4336] INFO-18) IN IN_DT_VAL Date(16) '2006-04-25'
2007-03-06 11:06:23,680 [4336] INFO-19) IN IN_DT_CAMBIO Date(16) '2006-04-21'
2007-03-06 11:06:23,680 [4336] INFO-20) IN IN_DT_OPER Date(16) '2006-04-28'
2007-03-06 11:06:23,680 [4336] INFO-21) IN IN_ORIGINE String(2) 'MX'
2007-03-06 11:06:23,680 [4336] INFO-22) OUT OUT_ERRCODE Int32(0) '0'
2007-03-06 11:06:23,680 [4336] INFO-23) OUT OUT_ERRLABEL String(250) ''
2007-03-06 11:06:23,680 [4336] INFO-Result = OK
2007-03-06 11:06:23,680 [4336] INFO-StoreProcedureEnd --------------
2007-03-06 11:06:23,680 [4336] ERROR-ERROR [42895] [IBM][CLI Driver][DB2] SQL0301N The value of input host variable or parameter number "" cannot be used because of its data type. SQLSTATE=42895

- Microsoft.Data.Odbc.OdbcException: ERROR [42895] [IBM][CLI Driver][DB2] SQL0301N The value of input host variable or parameter number "" cannot be used because of its data type. SQLSTATE=42895
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Wed Mar 07, 2007 8:49 pm    Post subject:
Reply with quote

I suspect you may be passing the parm to the stored procedure which is not compatible with the datatypes that the stored procedure is expecting. Its just a guess. Not sure though..!
Back to top
View user's profile Send private message
pinomaiulis

New User


Joined: 08 May 2006
Posts: 6
Location: Italy

PostPosted: Wed Mar 07, 2007 8:54 pm    Post subject:
Reply with quote

vini_srcna wrote:
I suspect you may be passing the parm to the stored procedure which is not compatible with the datatypes that the stored procedure is expecting. Its just a guess. Not sure though..!


Stored Procedure PARM

CREATE PROCEDURE DGR0131 (IN IN_MATRICOLA INTEGER
, IN IN_TY_OPE CHAR(1)
, IN IN_CD_ABI INTEGER
, IN IN_PG_PREMIO TIMESTAMP
, IN IN_PG_HOST INTEGER
, IN IN_DOSSIER DECIMAL(11,0)
, IN IN_SOTTO_DOSSIER INTEGER
, IN IN_LABEL_MUREX CHAR(20)
, IN IN_IM_YDAY_VALUE DECIMAL(15,2)
, IN IN_IM_YDAY_PRICE DECIMAL(15,2)
, IN IN_CD_ISIN_FT CHAR(12)
, IN IN_CD_ISIN_OPT CHAR(12)
, IN IN_CD_ISIN_UNDER CHAR(12)
, IN IN_CD_CAUSALE CHAR(4)
, IN IN_CD_DIVISA CHAR(3)
, IN IN_CD_STATUS_MOV CHAR(1)
, IN IN_CD_INV_CAD CHAR(1)
, IN IN_DT_VAL DATE
, IN IN_DT_CAMBIO DATE
, IN IN_DT_OPER DATE
, IN IN_ORIGINE CHAR(2)
, OUT OUT_ERRCODE INTEGER
, OUT OUT_ERRLABEL VARCHAR(250)
)
--------------------------------------------------------------------

DYNAMIC RESULT SET 1
CALLED ON NULL INPUT
LANGUAGE SQL
MODIFIES SQL DATA
COLLID COLBDBT
WLM ENVIRONMENT DBTWLM1
ASUTIME NO LIMIT
COMMIT ON RETURN NO
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 08, 2007 2:53 am    Post subject:
Reply with quote

Hello,

This:
Quote:
2007-03-06 11:06:23,680 [4336] INFO-23) OUT OUT_ERRLABEL String(250) ''

may be your problem.
Try:

Quote:
2007-03-06 11:06:23,680 [4336] INFO-23) OUT OUT_ERRLABEL String(250) ' '


The original has a double quote (which is mentioned in the messages) - i believe 2 single quotes will help.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
No new posts DB2 SQL Error: SQLCODE=-440, SQLSTATE... kishpra DB2 1 Sat Feb 18, 2017 2:31 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us