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
 

 

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
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 SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts Problem with GETMAIN command amitc23 CICS 6 Thu Sep 01, 2016 1:01 pm


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