View previous topic :: View next topic
|
Author |
Message |
mad_guy Currently Banned New User
Joined: 15 Jan 2010 Posts: 31 Location: India/UK
|
|
|
|
I am getting sqlcode SQL0310N while calling a cobol db2 stored procedure. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
You just made a statement
what the **** do You want from us ?
read the manual ( even a stupid google search will be enough )
and take the appropriate action as described in the message text |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Quote: |
SQL0310N
SQL statement contains too many host variables.
Explanation
The maximum number of host variables was exceeded in the statement.
The statement cannot be processed.
User response
Ensure the statement has fewer host variables or is less complex.
|
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Sambhaji ,
You were too kind, some do not really deserve other people wasting time to search and post the result of the search |
|
Back to top |
|
|
mad_guy Currently Banned New User
Joined: 15 Jan 2010 Posts: 31 Location: India/UK
|
|
|
|
Hi ashimer,
Can you please explain me,on what context I can get this "Too many host variables- Errior" while calling a stored procedure.
It has 4 input parameters,4 output parameters and 2 result set...
Only googling does not help me here.. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Input parameters do not matter.
Output parameters do not matter.
What part of
Quote: |
SQL statement contains too many host variables. |
is not clear to you?
If you are looking at anything else but the SQL statement, you are looking in the wrong place. And unless you actually post the statement, there's not much anybody here can do to help you. |
|
Back to top |
|
|
mad_guy Currently Banned New User
Joined: 15 Jan 2010 Posts: 31 Location: India/UK
|
|
|
|
Actually, it was working fine just 1 day before....
It has around 10-12 sql statements and 4 of them has host variables which are fine as per my knowledge.
today I only added a 3 new output parameters and its having the problem... |
|
Back to top |
|
|
mad_guy Currently Banned New User
Joined: 15 Jan 2010 Posts: 31 Location: India/UK
|
|
|
|
One more thing..I want to mention,the external cobol of the db2 stored procedure is exactly working fine when I am calling it as a cobol sub program. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
the mainframeassist, that one can download from this site,
states that a -310 indicates non-decimal data in a decimal parm.
Quote: |
DECIMAL HOST VARIABLE OR PARAMETER number CONTAINS NON-DECIMAL DATA
DB2 received nondecimal data from either an application (in the form of a host variable), function or a stored procedure (in the form of a parameter that was passed to or from function or a stored procedure).number Identifies either the host variable number (if the message is issued as a result of a FETCH, INSERT, UPDATE, DELETE, SELECT, VALUES INTO, or SET assignment statement statement), or the parameter number (if the message is issued as the result of the invocation of a function, or a CALL statement).
|
it appears to be a worldwide problem,
but programmers do not display the error code,
(yeah yeah, I know, it involves yet another call)
and text when having a problem with db2.
as a result,
useful information is never seen.
the error msg contains the parameter number (the sequential parm)
of the offending parm.
one only has to investigate the population of the parm to solve the problem.
but, this will continue to be a problem,
because the TS,
like so many others on this board,
is not mentally suitable for IT work.
often we ask why they do not ask their co-workers.
it is obvious,
especially considering the phrasing of the question
and complete lack of understanding of basics
that their co-workers don't want to talk to them either.
who would want to talk to some rookie, with almost no understanding of computers,
put up with their airy-fairy comments and politically correct bs
which is nothing but a charade to cover up the fact that
they will make no effort to improve their skill level |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Actually, it was working fine just 1 day before....
It has around 10-12 sql statements and 4 of them has host variables which are fine as per my knowledge.
today I only added a 3 new output parameters and its having the problem...
|
so you are basically saying you don't have a problem, then. Either you believe the computer when it tells you something is wrong with the SQL statement, or you believe your statement that everything is fine. One way you will get rid of the attitude, LOOK AT WHAT ACTUALLY IS WRONG AND FIX IT, and the other way you will continue to get the error message. Your choice.
Or, you could remove your changes and run without them. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
mad_guy wrote: |
One more thing..I want to mention,the external cobol of the db2 stored procedure is exactly working fine when I am calling it as a cobol sub program. |
once again, showing lack of thought or knowledge.
a Stored Procedure, invoked as a Stored Procedure, is run by DB2.
a cobol program, invoked as a cobol program, is run by cobol.
cobol is a little more forgiving than db2.
and that it worked ok until some changes were made.
I will let you in to a little computer secret:
If it worked before the changes,
good chance the changes are the problem |
|
Back to top |
|
|
mad_guy Currently Banned New User
Joined: 15 Jan 2010 Posts: 31 Location: India/UK
|
|
|
|
had enough of you all...
did not get any little help...
But...anyway... I will fix my issues....
Thanks to ALL...FOR YOUR CO-OPERATION..... |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
The quality of the help depends upon the quality of the question. -- and you started by not even asking a question, just making a statement
If the error message says something is wrong with the SQL, and you claim the SQL is perfectly fine, there's nothing WE can do to help. You must first believe the computer when it tells you an error exists -- all else is futile until then. |
|
Back to top |
|
|
mad_guy Currently Banned New User
Joined: 15 Jan 2010 Posts: 31 Location: India/UK
|
|
|
|
Thank You again..Mr. TANSTAAFL ...
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
had enough of you all...
|
Well, that goes both ways. . .
Quote: |
I am getting sqlcode SQL0310N while calling a cobol db2 stored procedure. |
Quote: |
did not get any little help... |
You got more help than you deserved. . .
Quote: |
But...anyway... I will fix my issues.... |
That - Or seek other employment. |
|
Back to top |
|
|
mad_guy Currently Banned New User
Joined: 15 Jan 2010 Posts: 31 Location: India/UK
|
|
|
|
Thanks Mr. dick ...
You have found something to post here... So a lots of Thanks to you also.
|
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Are you really seeking for help?? |
|
Back to top |
|
|
mad_guy Currently Banned New User
Joined: 15 Jan 2010 Posts: 31 Location: India/UK
|
|
|
|
Hey... I had ENOUGH......
So, don’t show me those 'Evils'...
You should have understood already that I am not seeking your help…after all these...
I am not here to see your eyes...or anger or frustration...
just becoz...I m quite and thanking you in every case....don’t test my patience... |
|
Back to top |
|
|
|