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
 
UNLOAD vs SQL Processing

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: UNLOAD vs SQL Processing
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: 686
Location: Earth

PostPosted: Wed Apr 09, 2008 7:27 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject: UNLOAD vs SQL Processing
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    Post subject: Reply to: UNLOAD vs SQL Processing
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    Post subject:
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    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 processing a XML file in PL/1 grvtomar PL/I & Assembler 2 Fri Jun 09, 2017 1:07 pm
No new posts File processing vishwakotin Mainframe Interview Questions 14 Fri Apr 28, 2017 11:38 am
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
This topic is locked: you cannot edit posts or make replies. Need help in estimating space of unlo... ashek15 IMS DB/DC 12 Fri Apr 07, 2017 5:11 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm

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