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
 

 

Dynamic SQLs

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

New User


Joined: 05 Jul 2007
Posts: 40
Location: Minneapolis, MN

PostPosted: Tue May 05, 2009 9:00 pm    Post subject: Dynamic SQLs
Reply with quote

Is it a safe assumption to say that any dynamic SQL will have "PREPARE" and/or "EXECUTE" keyword in it???
Back to top
View user's profile Send private message

Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Wed May 06, 2009 2:20 pm    Post subject:
Reply with quote

PREPARE is a must but not EXECUTE.

If the query is fixed and no changes are required in future like column additons then PREPARE is enough, otherwise EXECUTE is a must
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 186
Location: chennai

PostPosted: Wed May 06, 2009 11:15 pm    Post subject: Reply to: Dynamic SQLs
Reply with quote

Hi

Quote:
PREPARE is a must but not EXECUTE.


We can not come to a conclusion like this without going thru the requirement of the program. If the Dynamic Sql program is for NON-SELECT, we can say EXECUTE is a must not PREPARE. If it is Parameterized NON-SELECT, we need both PREPARE and EXECUTE. For Fixed list SELECT and Variable List SELECT, we do not need the EXECUTE statement but PREPARE is required.

Regards
Raghu
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 Dynamic array request/response contai... Suja.Sai CICS 2 Tue Jan 24, 2017 11:37 am
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts Creating a dynamic sort card in JCL u... ChitraChhabra DFSORT/ICETOOL 4 Wed Aug 03, 2016 6:15 pm
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm
No new posts Need to create file with Dynamic Name... kapil27 JCL & VSAM 4 Wed May 25, 2016 9:45 am


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