Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Streamlining File Updates

Status
Not open for further replies.

lepgmr

Programmer
Joined
May 7, 2004
Messages
1
Location
US
I need advice on the best way to handle the following file update scenario:

File A: Contains temporary records that track all transactions associated with a request.
File B: New file will provide a permanent record of several fields from File A. The data in this file must mirror data from File A as it is generated/updated.

There are about 5 pgms that routinely update File A. Should I:
1. Compare these fields in the update routine of each pgm, open File B & write/update changes?
2. Compare fields & call a single update pgm from all 5, passing changed data in parameters?
3. Call an update pgm from all 5 that opens both files & writes/updates fields from the appropriate record from File A into File B.?
4. Other?

Assuming that I can't use triggers or modular programming which solution makes the most sense? Thanks for your help.
 
With the limits you offer, I would suggest option 2. Keeping all the update logic in one place will be easier to maintain and debug than have 5 pgms with update logic. This comes close to "modular" programming, though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top