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
 
Problem in Execute immediate

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

New User


Joined: 14 Sep 2006
Posts: 11
Location: Chennai

PostPosted: Sun Apr 27, 2014 5:38 pm    Post subject: Problem in Execute immediate
Reply with quote

Hi,
I have written a new program to perform Execute immediate in cobol.
The program reads the input file which has sql queries and executes them.

When I tested in lower region, it worked perfectly. But in production I am getting sqlcode -518.

Can anyone tell me what I am missing.
Let me know if more details needed.

Thanks.
Back to top
View user's profile Send private message

enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10535
Location: italy

PostPosted: Sun Apr 27, 2014 6:24 pm    Post subject: Reply to: Problem in Execute immediate
Reply with quote

no need to reinvent the wheel


follow the link here for pretty good code examples
http://www.ibmmainframes.com/viewtopic.php?t=59952&highlight=csntep2
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10535
Location: italy

PostPosted: Sun Apr 27, 2014 8:11 pm    Post subject: Reply to: Problem in Execute immediate
Reply with quote

You posted nothing that You could not debug Yourself just looking at the manuals

from the relevant db2 manuals
Quote:
-518
THE EXECUTE STATEMENT DOES NOT IDENTIFY A VALID PREPARED STATEMENT


so instead of wasting my time in remote debugging
I pointed You to a tested and working clone of DSNTEP2
sorry for forcing You to click twice icon_evil.gif


and DO NOT PM with futilities
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 UNSTRING problem Apurva Ghogale COBOL Programming 3 Tue Oct 09, 2018 8:01 pm
No new posts Can we execute JES2 Commands in JES3? sakthikumarT JCL & VSAM 4 Tue Oct 02, 2018 11:55 pm
No new posts U0437 to execute IMS DC program Vkp321 IMS DB/DC 6 Wed Sep 19, 2018 8:39 pm
No new posts RPG II Problem with unsigned Packed d... Andi1982 All Other Mainframe Topics 6 Tue Sep 11, 2018 6:11 pm
No new posts Problem with Return or Exit from DCB ... Vishnu Priya M R PL/I & Assembler 6 Thu Aug 23, 2018 9:43 am

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