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

Choice between DB2 Table or Flat file (QSAM)


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

Active User


Joined: 06 Jun 2009
Posts: 115
Location: UK

PostPosted: Fri Aug 14, 2009 2:53 pm
Reply with quote

Dear all,

I am working on Montly Statement module of Credit Card domain. We have serveral input files along with driver files to create final Statement file for Statement formatter and printer.

I have mostly seen systems only managing with flat (disk or tape) files to carry out entire processing. There was design suggestion that lets keep data on table.

Can someone please talk about pros and cons of using DB2 table and flat file. Based on experience, I can say flat files are right choice.

Thanks.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 14, 2009 5:09 pm
Reply with quote

Quote:
Can someone please talk about pros and cons of using DB2 table and flat file. Based on experience, I can say flat files are right choice.
It really depends upon what you're doing. For a monthly process, a flat file is fine since you're going to sequentially process it anyway. However, you don't want to have to read millions of records to authorize a purchase -- that would take too long. In such a case a VSAM file or DB2 table that allows direct access to the data would be the only way to proceed.
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Fri Aug 14, 2009 5:09 pm
Reply with quote

This is really a vague question. The answer would be it all depends on the complexity of your business logic.

To start with,
Table - You can access each field in a record directly using the column name and you can directly retrieve a record (row) using SQL.
Flat file - You need to first retrieve the whole record and from that you would parse to find out your field (usually record layout). You need to read sequentially to find out the record you need.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Aug 14, 2009 8:10 pm
Reply with quote

Hello,

Quote:
The answer would be it all depends on the complexity of your business logic
I believe if would depend more on how the data is to be processed (as Robert mentioned). . .

If everything to be done is wholesale, there is little reason to use a method that primarily supports random access of individual bits of into.

If the requirement is to randomly access individual bits of info, sequential would be a poor choice.

In either case the business logic could be extermely complex or totally trivial.
Back to top
View user's profile Send private message
zh_lad

Active User


Joined: 06 Jun 2009
Posts: 115
Location: UK

PostPosted: Sat Aug 15, 2009 3:57 pm
Reply with quote

Thanks for replying.

I do not think its vauge question. Its a classis business case and I posted the question on forum. Statement production processing exists in entire financial sector, so far I had seen the developed

For statement production I do not need to authorize any transcation. After reading all the answers, I have got the techincal reason to choose flat/vsam file over DB2.

DB2 is meant more for random access even without reading entire record.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Aug 15, 2009 7:56 pm
Reply with quote

Quote:
Can someone please talk about pros and cons of using DB2 table and flat file
.
for what ???

Quote:
I do not think its vauge question. Its a classis business case and I posted the question on forum. Statement production processing exists in entire financial sector,


since as You say it' s a classic business case there should be no need to ask,
Your competence shuld be all is needed to solve Your issue icon_cool.gif

anyway the question could not have been asked in a more foggy way
You could have posted
Quote:
It is further assumed that a constant flow of effective
communication is further compounded when taking into account
the overall negative profitability.

and the result would have been the same
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top