IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Problem in Execute immediate


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Apr 27, 2014 6:24 pm
Reply with quote

no need to reinvent the wheel


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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Apr 27, 2014 8:11 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Fetch data from programs execute (dat... DB2 3
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
No new posts z/vm installation problem All Other Mainframe Topics 0
Search our Forums:

Back to Top