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

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
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: 10327
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
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm

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