JMS@MRSVAX.MIS.ARIZONA.EDU (Profitability is the sovereign of the enterprise, Drucker) (09/21/87)
"Kevin Cole Gallaudet U. Washington DC" writes: > I'm looking for a relatively simple way (preferably in DCL) to check a file's >modification date against the last interactive LOGIN date. Ahhh. Well, think about it for a second. WHEN does the last login field get updated? Answer : In Loginout. So, when you get to J.Random Program, you're stuck. Aside from devious hackery to get the information before LOGINOUT blivets it, there's not a simple way to get the last login date. The way to get it, by the way, is through $GETUAI. There is no DCL F$GETUAI yet. This, of course, doesn't help you much. A couple of alternative are available. One possiblity is to store your own date, call it "last-time- I-read-this-file" in the authorization file. My opinion: bad idea. Don't be mucking in the authorization file; some day, Digital will come around and cut your fingers off and won't even warn you. Second possibility: keep a separate file of last-time-I-read-this-file dates, with a record for each user. A couple of widely distributed news programs do this. It means an extra file somewhere, and an extra file open (expensive!) each time someone logs in, but it's an easy to administer solution. It's basically unclean, though, and that's bad. Another possibility is to twiddle the modification date on some particular object, like LOGIN.COM or the user's directory file. This has the attribute of being incredibly clean, but really dangerous. In addition, an object which gets accessed during the login session would leave a gap of time which wouldn't be covered. +-------------------------------+ | Joel M Snyder | BITNET: jms@arizmis.BITNET | Univ of Arizona Dep't of MIS | Internet: jms@mrsvax.mis.arizona.edu | Tucson, Arizona 85721 | Pseudo-PhoneNET: (602) 621-2748 +-------------------------------+ ICBM: 32 13 N / 110 58 W (I have gotten into trouble too many times to put any faith in disclaimers) "There's nothing here that an overdose of Seconal won't cure."