Hello,
How can I update certain columns in a sequential file with data from another sequential file.
For example, the main sequential file would look something like this:
LoanNo, ZipCo, State, Int, Sfee, balance
456124, 21788, PA, 7.1250, .0250, 75000.00
333120, 55151, CA, 6.7580, .0250, 99000.00
122115, 31030, MD, 7.0000, .0250, 34000.00
990008, 31025, MD, 7.1250, .0250, 199000.00
The update file would look something like this:
LoanNo, Int
456124, 7.5000
In this example, only need to update colum "Int" for "LoanNo" 456124.
The main sequential file would have a LoanNo column and many other static columns. The update fiele will always have a LoanNo column and the columns with the data that need to update the main sequential file...so, the update sequential file could have one or more columns to update the main sequential file..... The update sequential file would have one or many rows.....
The "LoanNo" column will always be on both files.
Any suggestions will be appreciated!!
Thx,
How to update a sequential file
Moderators: chulett, rschirm, roy
Since positioning in a sequential file is not a good idea or practicable, you will need to process your data by reading through the source into a copy, modifying those records that have changed; then renaming your new file to overwrite the old.
Since this is a column update, just about any database including the hashed files will do this for you.
Since this is a column update, just about any database including the hashed files will do this for you.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Thank you for the feedback :D , this gives me a good start.
As far as loading the main sequential file into a table; does Ascential have a way to store its own tables (I thought that was metadata all about).
Or could you do it into an Microsoft Access table? How about a Hashed file? which way would be a more efficient way to do it?
I don't have access to a SQL or oracle table to use.
Thnx,
Rod
As far as loading the main sequential file into a table; does Ascential have a way to store its own tables (I thought that was metadata all about).
Or could you do it into an Microsoft Access table? How about a Hashed file? which way would be a more efficient way to do it?
I don't have access to a SQL or oracle table to use.
Thnx,
Rod
Hi,
The closest thing is hash files but I would vote against it (for several reasons).
If you want to store the data in the files go for DB or archiving system, which ever sutes your needs the best.
Actually you'll find processing sequential files is quite fast, so if FTPing them to the dS erver if you need to.
IHTH,
The closest thing is hash files but I would vote against it (for several reasons).
If you want to store the data in the files go for DB or archiving system, which ever sutes your needs the best.
Actually you'll find processing sequential files is quite fast, so if FTPing them to the dS erver if you need to.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
The hash files are probably a perfect method for what you need to do. Slam your file into a hash file, then parse it at need, referencing rows when necessary, adding rows, updating exist, etc, dump it back to a sequential file.
What's the big deal?
What's the big deal?
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle