I wrote the following little sub... I guess that it works.
--Bill
SUBROUTINE SUB.LOCK.AND.WRITE.R2 ( R.This, This.File, Record.ID )
prompt ''
open This.File to F.This.File else gosub Error.Opening.File
gosub Lock.And.Write
go The.End
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
Lock.And.Write:
Lock.Test = recordlocked (F.This.File, Record.ID)
begin case
case Lock.Test = 0 ; recordlocku F.This.File,
Record.ID
write R.This on F.This.File,
Record.ID
release F.This.File,
Record.ID
case 1 ; gosub Error.Record.Locking
end case
return
*------------------------------------------------------------------------------
Error.Opening.File:
crt @(-1)
crt @(-5)
crt
crt
crt
crt
crt
crt
crt
crt
crt
crt
crt
crt ' Big Problem... ' : @(-6)
crt
crt ' _________________________ '
crt ' \ \ ' : This.File
crt ' \ Error Opening File \ '
crt ' \________________________\ Contact HK.IT '
crt ' [X] '
crt ' ' :
input Ans, 1
Ans = upcase(Ans)
begin case
case Ans = 'X' ; null
case 1 ; go Error.Opening.File
end case
return to The.End
*------------------------------------------------------------------------------
Error.Record.Locking:
crt @(-1)
crt @(-5)
crt
crt
crt
crt
crt
crt
crt
crt
crt
crt ' Big Problem... ' : @(-6)
crt
crt ' _________________________ '
crt ' \ \ ' : This.File
crt ' \ Error, Record Lock \ '
crt ' \________________________\ Contact HK.IT '
crt
crt ' Open New Gull Session, Try UNLOCK.ME
'
crt ' [X]
'
crt ' '
:
input Ans, 1
Ans = upcase(Ans)
begin case
case Ans = 'X' ; null
case 1 ; go Error.Record.Locking
end case
return to The.End
*------------------------------------------------------------------------------
The.End:
RETURN
END
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Perry Taylor
Sent: Tuesday, August 31, 2010 3:35 PM
To: U2 Users List
Subject: [U2] [UV] Shared Record Locks
Has anyone a real-world application where UniVerse shared record locks are
used? I'm struggling with when they would be preferable to using an update
record lock. Anyone willing to "share" their experiences?
Thanks.
Perry Taylor
ZirMed
626 West Main St , 6th Floor
Louisville, KY 40202
www.zirmed.com <http://www.zirmed.com/>
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for
the sole use of the intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. ZirMed, Inc. has strict policies regarding the
content of e-mail communications, specifically Protected Health Information,
any communications containing such material will be returned to the originating
party with such advisement noted. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.
_______________________________________________
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