Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Choice between DB2 Table or Flat file (QSAM)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
zh_lad

Active User


Joined: 06 Jun 2009
Posts: 101
Location: UK

PostPosted: Fri Aug 14, 2009 2:53 pm    Post subject: Choice between DB2 Table or Flat file (QSAM)
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: 8121
Location: East Dubuque, Illinois, USA

PostPosted: Fri Aug 14, 2009 5:09 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Aug 14, 2009 8:10 pm    Post subject:
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: 101
Location: UK

PostPosted: Sat Aug 15, 2009 3:57 pm    Post subject: Reply to: Choice between DB2 Table or Flat file (QSAM)
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10277
Location: italy

PostPosted: Sat Aug 15, 2009 7:56 pm    Post subject: Reply to: Choice between DB2 Table or Flat file (QSAM)
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    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 Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us