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

UNLOAD vs SQL Processing


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

New User


Joined: 20 Sep 2007
Posts: 17
Location: cheenai

PostPosted: Wed Apr 09, 2008 9:56 am
Reply with quote

I have a table which has the following columns.
Main Table:
Branch
Account No
Account holder name
Account address
etc.

Say, Under a branch there might be 1 lakh accounts and there might be some 300 branches. Now, I want all the account details under some 50 branches(input in a file). I have two options.
a) Unload all the accounts from the table and extract only the accounts which are under given 50 branches(50 lakh accounts) through file processing
b) Retrieve the data through DB2 cursor.
Which one would be advisable.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Apr 09, 2008 7:27 pm
Reply with quote

Is this a one time requirement or you need to do it again sometime in future?
also
How about
c) Write a query and execute SPUFI in batch?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Apr 09, 2008 7:50 pm
Reply with quote

Unload just the data you want.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Thu Apr 10, 2008 3:49 pm
Reply with quote

Hi,

R u looking to retrieve data for the same set of 50 branches every time or it vary from time to time ?
Back to top
View user's profile Send private message
shafeeqspi

New User


Joined: 01 Apr 2008
Posts: 4
Location: Mysore

PostPosted: Fri Apr 11, 2008 3:40 pm
Reply with quote

U may use Cursor...

Regards,
Shaffu
Back to top
View user's profile Send private message
abhishekmdwivedi

New User


Joined: 22 Aug 2006
Posts: 95
Location: india

PostPosted: Fri Apr 11, 2008 6:54 pm
Reply with quote

Quote:
accounts which are under given 50 branches(50 lakh accounts) through file processing


If you have this much of huge data . I would say go for unload and then process, rather then going through a DB2 cursor to fetch records one by one. A unload will be a optimized solution to this.
Back to top
View user's profile Send private message
yogalakshmi

New User


Joined: 20 Sep 2007
Posts: 17
Location: cheenai

PostPosted: Tue Apr 15, 2008 12:23 pm
Reply with quote

Quote:
R u looking to retrieve data for the same set of 50 branches every time or it vary from time to time ?

It is a weekly job. So the data will vary fom time to time.(every week)

Quote:
A unload will be a optimized solution to this.


We have recommended to use unload instead of cursor (which is being used currently in the program) considering the huge volume of data.It is approved and we have started implementing the change.

Thank you all.
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 Load new table with Old unload - DB2 DB2 6
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts changing defaults in db2 admin - Unlo... DB2 0
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top