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

New User


Joined: 06 Jun 2009
Posts: 95
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: 7931
Location: Bellevue, IA

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

New User


Joined: 06 Jun 2009
Posts: 95
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: 10210
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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