Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SQL0310N -while calling cobol db2 stored procedure

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

New User


Joined: 15 Jan 2010
Posts: 31
Location: India/UK

PostPosted: Tue Jun 01, 2010 3:55 pm    Post subject: SQL0310N -while calling cobol db2 stored procedure
Reply with quote

I am getting sqlcode SQL0310N while calling a cobol db2 stored procedure.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Jun 01, 2010 4:34 pm    Post subject: Reply to: SQL0310N -while calling cobol db2 stored procedure
Reply with quote

You just made a statement icon_cool.gif

what the **** do You want from us ? icon_evil.gif
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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Jun 01, 2010 4:37 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Jun 01, 2010 4:42 pm    Post subject: Reply to: SQL0310N -while calling cobol db2 stored procedure
Reply with quote

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
View user's profile Send private message
mad_guy
Currently Banned

New User


Joined: 15 Jan 2010
Posts: 31
Location: India/UK

PostPosted: Tue Jun 01, 2010 5:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Jun 01, 2010 5:51 pm    Post subject:
Reply with quote

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
View user's profile Send private message
mad_guy
Currently Banned

New User


Joined: 15 Jan 2010
Posts: 31
Location: India/UK

PostPosted: Tue Jun 01, 2010 5:59 pm    Post subject:
Reply with 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...
Back to top
View user's profile Send private message
mad_guy
Currently Banned

New User


Joined: 15 Jan 2010
Posts: 31
Location: India/UK

PostPosted: Tue Jun 01, 2010 6:03 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jun 01, 2010 6:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Jun 01, 2010 6:09 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jun 01, 2010 6:11 pm    Post subject:
Reply with quote

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
View user's profile Send private message
mad_guy
Currently Banned

New User


Joined: 15 Jan 2010
Posts: 31
Location: India/UK

PostPosted: Tue Jun 01, 2010 6:20 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Jun 01, 2010 6:28 pm    Post subject:
Reply with quote

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
View user's profile Send private message
mad_guy
Currently Banned

New User


Joined: 15 Jan 2010
Posts: 31
Location: India/UK

PostPosted: Tue Jun 01, 2010 6:31 pm    Post subject:
Reply with quote

Thank You again..Mr. TANSTAAFL ...
icon_smile.gif
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: Tue Jun 01, 2010 9:44 pm    Post subject:
Reply with quote

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
View user's profile Send private message
mad_guy
Currently Banned

New User


Joined: 15 Jan 2010
Posts: 31
Location: India/UK

PostPosted: Wed Jun 02, 2010 10:34 am    Post subject:
Reply with quote

Thanks Mr. dick ...
You have found something to post here... So a lots of Thanks to you also.
icon_biggrin.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Jun 02, 2010 10:44 am    Post subject:
Reply with quote

Are you really seeking for help?? icon_evil.gif icon_evil.gif icon_evil.gif
Back to top
View user's profile Send private message
mad_guy
Currently Banned

New User


Joined: 15 Jan 2010
Posts: 31
Location: India/UK

PostPosted: Wed Jun 02, 2010 11:00 am    Post subject:
Reply with quote

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
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
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us