De-install an MFS on the fly (AREV Specific)
At 19 JUL 2007 03:47:39AM Stefano Cavaglieri wrote:
The MFS documentation (page 24) says that it is possible to de-install an MFS dynamically by updating a file handle in an R/Basic program, but it doesn't say how!
I have a file that has an MFS installed and want to disable it temporarily because I need to run an I/O intensive procedure on it, and don't need this specific MFS to capture all read and write calls.
Any hints (using ARev 3.12) ? Thanks a lot in advance,
Stefano
At 19 JUL 2007 04:57AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Open the file, remove the MFS from the File Variable, use the modified file variable. (If it's the 3 MV of the first field for example, Var=Delete(Var, 1, 3, 0, 0)).
World leaders in all things RevSoft
At 19 JUL 2007 06:14AM Stefano Cavaglieri wrote:
Thanks Sprezz… but it does not work.
1) I thought that MFSs are subvalue delimited within the 1st value…
2) delete() only accepts 4 arguments…
If I look at the file variable the MFSs installed are SI.MFS:@svm:ICH_MFS (which is mine):@svm:RTP57. Here's an extract of the routine I'm working on:
open "I_OBJ" to objHandle else goto EOF
objHandle=delete(objHandle, 1, 1, 2)
select objHandle
Done ="
loop
readnext objKey else Done=1until Done
print @(42, vLine):fmt(objKey, "R#11")lock objHandle, objKey thenread objRec from objHandle, objKey thennewRec =objRec...repeat
The routine runs properly, but all write calls are still intercepted by my MFS!!! Any further idea?
Stefano
At 19 JUL 2007 11:16AM Warren Auyong wrote:
Create a synonym entry in the REVMEDIA file without the MFS in field 2 of the file descriptor.
Reattach the volume and open the synonym in your program.
Since you know how to add MFSes to the file then you can do this easily.
At 19 JUL 2007 01:40PM Richard Hunt wrote:
Why not just modify the MFS subroutine program to skip the write procedure of the MFS for that file, temporary.
Since you would have the source code to the MFS, it would be easiest to do it that way.
At 20 JUL 2007 12:33PM dsig@sigafoos.org wrote:
This is the best idea.
If there are times that mass updates (or any process) is going to be done against a table with MFSs the MFS should be able to be keyed with a common or some such .. makes life much nicer. No playing with file handles .. no attach/detach .. just set common value. Make a routine to turn on and off ..
At 23 JUL 2007 06:28AM Stefano Cavaglieri wrote:
Thanks a lot, Warren, that did the trick.
Stefano
At 28 JUL 2007 10:01AM Warren Auyong wrote:
The method that Sprezzatura recommended appears to have stopped working in some version of ARev. Perhaps file handles are somehow cached and maybe a flush garbagecollect is in order?
The idea of having a common variable in your MFS that can be set by a program to toggle the MFS is a good one. This is what the BATCH.INDEXING routine does and one of my clients uses this technique on their MFSes.