MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dynamic SQL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
sharada
Beginner


Joined: 24 Aug 2005
Posts: 32
Topics: 14
Location: Hyderabad

PostPosted: Mon Nov 20, 2006 3:30 am    Post subject: Dynamic SQL Reply with quote

HI,

is it possible to write dynamic sql queries?

moving the entire query into a variable and executing the query using the value in the variable.

Can anyone one of you hekp me?
Back to top
View user's profile Send private message
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Mon Nov 20, 2006 5:13 am    Post subject: Reply with quote

Look at the source code of DSNTEP2. This source is part of the DB2 libraries (DSNSAMP, SAMPLIB, ???).

regards
Christian
Back to top
View user's profile Send private message
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Tue Nov 21, 2006 4:54 am    Post subject: Reply with quote

Well, sharada,

using dynamic SQL is much more complicated. The reason is, that you have to allocate storage for the data fetched by your dynamic statement, and you don't know up front, what data types you will select.

regards
Christian
Back to top
View user's profile Send private message
acevedo
Beginner


Joined: 03 Dec 2002
Posts: 127
Topics: 0
Location: Europe

PostPosted: Tue Nov 21, 2006 5:41 am    Post subject: Reply with quote

sharada what are you using? Cobol, Rexx, Syncsort ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group