Only needed if you care about eventually running out of locks. LOL It will run a few thousand transactions before it blows up the system. :-D
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Wolverton Sent: Thursday, April 24, 2008 11:51 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Guaranteed unique sequential keys OOPS!! I forgot the RELEASE on the THEN!! Bad David!! > > BASE.KEY = KEY > SEQCNT = 1 > DO.WRITE = 0 > LOOP UNTIL DO.WRITE > READVU TESTINGIT FROM FILENAME, KEY, 0 LOCKED > * No need to wait, Drop To Key Update > END THEN RELEASE FILENAME, KEY ; ******************** VERY NEEDED! > * Need a new key, Drop to Key Update > END ELSE > * Go! > EXIT > END > * Once here, start adding sequence data... > KEY = BASE.KEY:"*":SEQCNT > SEQCNT += 1 > REPEAT > WRITE REC ON FILENAME, KEY ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/