Everhart, Glenn From: vandenheuvel@eps.enet.dec.c*m Sent: Monday, September 28, 1998 7:07 PM To: Info-VAX@Mvb.Saic.Com Subject: Re: detect when .LOG file was last written to In article <6u2rvf$3b0$1@probity.mcc.ac.uk>, helbig@man.ac.uk (Phillip Helbig) writes... >As appending something to, for example, an open .LOG file doesn't change >any of the dates, is there anyway to detect when it has been last >written to, other than counting the lines with SEARCH and comparing to a >previous count? You can check the current end by using RMS and look at the XABFHC for the EBK and FFB fields, or you can use the ACP QIO which RMS uses directly. However, the writer will have to cooperate by calling RMS SYS$FLUSH. In a full shared environment, you may want to consider to latch onto the RMS file lock and/or the APPENDER lock. Just use ANAL/SYSTEM... SET PROC ... SHOW PROC/LOCK and you'll soon enough see how the file lock is named ( volume, file-id,..) and use SHOW PROC/RMS=(SFSB) to see the contents of the value block nicely formatted. SMOP! Just remember to get the lock in EXEC mode. But then again, under full sharing, why not just have a shared reader 'lurking' and wake up every so often to see whether there is new data. hth, Hein.