when you enter the routine, try
IF RECORDLOCKED( F.VAR , ID ) THEN
set a flag for that file/id
END
do WRITEU's
when leaving the routine, test the flag to see if the record should
be released.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Stevenson,
Charles
Sent: Friday, September 10, 2004 9:16 AM
To: [EMAIL PROTECTED]
Subject: [U2] UV: how best for subr to ask "Do I own a readu lock for
[file & rec0?"
I'm trying to retrofit a fix into an update subroutine called from lots
of places, 1 to 3 layers deep, in legacy code.
Currently the subr writes many records, releasing each.
Sometimes it shouldn't release; it should let the calling program
control that.
(By the way, stale memory records in calling programs is not an issue in
my particular case. Yes, I thought about that.)
This is the reason "nested transactions" were invented. *Sigh*
Don't suggest retrofitting UV's transaction logging
(START/COMMIT/ABORT). I love it for new systems, but I avoid
retrofitting it.
All I can think of is to execute "LIST.READU USER [self]" and parse,
but I have this vague idea that there is a basic command that I'm not
remembering.
Thanks,
Chuck Stevenson
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/