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

Why cant we use Union in embedded SQL


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mohideen

New User


Joined: 31 Mar 2004
Posts: 4

PostPosted: Tue May 30, 2006 11:59 am
Reply with quote

(1) which DB2 utility program used to make full image copy and incremental image copy?

(2) why cant we use Union in embedded SQL?

Thanks mohideen.
Back to top
View user's profile Send private message
callkris_cit

New User


Joined: 22 Apr 2006
Posts: 44

PostPosted: Wed May 31, 2006 3:19 pm
Reply with quote

(1) which DB2 utility program used to make full image copy and incremental image copy?

DSNUTILB utility program is used to take a Image copy and Incremental copy.

(2) why cant we use Union in embedded SQL?

We can use Union in embedded SQL. But you should create a Cursor for Select statement.
Back to top
View user's profile Send private message
mahsug

New User


Joined: 01 Jul 2003
Posts: 15
Location: Phoenix , AZ

PostPosted: Fri Jun 02, 2006 5:08 pm
Reply with quote

Hi ,

I have a small correction to what Krsi said , DSNUTILB is a program , which would be made use for most of the Db2 batch programs , its only the input / control card statements would make difference for the utility.

For the above query , the input program would DSNUTILB , and the Db2 utility is COPY
and the statement for full image copy would be like

COPY TABLESPACE <DBNAME >.<TSNAME> FULL YES

and the statement for Incremental image copy would be like

COPY TABLESPACE <DBNAME >.<TSNAME> FULL NO

Referring to the query no 2 regarding usage of union in embedded SQL ,.
we can certainly use the union withCURSORS , but the overhead on the memory will be too high (Assuming , your result sets are very huge ), which would degrade the application performance.

Let me know , if more questions

Mahesh
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 cobol embedded sql COBOL Programming 7
No new posts Null Indicator value -2 means in Embe... DB2 2
No new posts [SQL0029] INTO clause missing from em... DB2 2
No new posts Illegal use of keyword fetch. Token w... DB2 2
No new posts Embedded programs / link'ed programs CICS 5
Search our Forums:

Back to Top