Someone posted a program to do this a couple of years ago. I can post my version if needed.
Rich Richard Sammartino Systems Analyst School District of Philadelphia 440 N Broad Street Philadelphia, PA 19130 Phone (215) 400-5086 Fax (215) 400-4411 ----- Original Message ----- From: "Jacques G." <[email protected]> To: "U2 Users List" <[email protected]> Sent: Thursday, June 2, 2011 1:50:03 PM Subject: [U2] [UV] Obtaining a file creation date and time without locking it Hello, Currently I have code that does something like this: EQU TM.LIMIT TO 3 ;* File useable if created less than TM.LIMIT seconds ago. OPENSEQ PATH.HOUSE:"ipcs.txt" TO F.IPCS ELSE RETURN STATUS STAT FROM F.IPCS THEN CLOSESEQ F.IPCS IPCS.TM = STAT<15> IPCS.DT = STAT<16> SEC.PASSED = (DATE() - IPCS.DT) * 86400 SEC.PASSED += (TIME() - IPCS.TM) IF SEC.PASSED > TM.LIMIT THEN RETURN ;* Too old can't use it END The problem with this approach, is that in order to query the file's internal date and time, I have to do an OPENSEQ which locks the file. This means that another process that may need to perform the same check has to wait for the lock to be released. Any way to open the file in a ReadOnly mode in UV so that It won't get locked ? Jacques _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
