Jump to content

I know flat files are not meant for this kind of scenario bu...

Ricardo Lara

Recommended Posts

I know flat files are not meant for this kind of scenario but I would like to know if there is a way to have multiple concurrent users reading/updating a flat file. I didnt have any issues with just a few users using the form, but when more users began working with it, we lost a bunch of records. What I would like to know is if there is a way to lock/unlock the file while reading or writing, or any other advise would be greatly appreciated.

A colleague told me about the MATCH - MODIFY FILE command but I couldnt find detailed information about it.

Thanks in advance.


Link to comment
Share on other sites

Hi David, they way Im updating some rows in the flat file is doing a pre hold of the flat file, and having the IDs of the rows that I need to update in a string. After that, in a new TABLE FILE (format DFIX delimited with pipes) in the DEFINE I check if the current row needs to be updated (DECODE with the string), and update the values if thats the case or rewrite the values from the flat file.
Link to comment
Share on other sites

You guys have a pretty hefty amount of WebFOCUS users there at Autozone - Id get a real table set up somewhere in a database youre allowed to write to.

As you said at the outset, flat files just arent made for that sort of thing.

MODIFY will work once you get to a database of some sort (or .foc files).

Link to comment
Share on other sites

As you are new-ish: MODIFY is the old file/table update language. If you use HTMLFORMs to pass it variables, you can write to tables, or create NEW flat files. Best to think of it as a batch update language only- no GUI. If you want an integrated GUI / add-update-delete language, MAINTAIN is the command of CHOICE. Finally- I will second (third) Waz and Toby- a database is really the way to go when dealing with more than 2-3 users potentially doing updates at the same time.

I am out of the infrastructure business now, but they used to ship a DB with 8x for those folks that needed something for their own repository- I am pretty sure you could also use that (but would not swear on a stack of PDFs, just in case).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...