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
 
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: 193
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 REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
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

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