Re: MATREADU/MATWRITE statements timing out
- From: Jim Idle <jimi@xxxxxxxxxxxxxxxxx>
- Date: Sat, 24 Nov 2007 05:00:51 -0800 (PST)
On Nov 23, 10:01 am, Allen Egerton <aeger...@xxxxxxxxx> wrote:
Allen Egerton wrote:
matt...@xxxxxxxxx wrote:
<snip>
Anyway, I'm getting all flustered and normally I'm such a quiet
boy ;-) Anyway I'm off to put a timed INPUT routine on the Stock
entry program to exit after a period if inactivity and having some
knowledge of Pick/U2 know this is more tricky on a U2 system rather
than D3.
Here's some code I wrote years ago on a Universe system to re-try a
number of times, then give up. Note the increasing sleep period.
ATTEMPTS = 0
READU D.TRANSACTIONS FROM F.TRANSACTIONS, K.TRANSACTIONS LOCKED
ATTEMPTS += 1
IF ATTEMPTS LT 10 THEN
CRT CLR22DOWN: "TRANSACTIONS ": K.TRANSACTIONS:
CRT " locked by ": STATUS(): " (pausing before retry).":
CALL !SLEEP$(ATTEMPTS*1000)
CRT CLR22DOWN:
GOTO READ.TRANSACTIONS:
END ELSE
BUFF = "RECORD ": K.TRANSACTIONS: " LOCKED AND CONSEQUENTLY
SKIPPED."
GOSUB OUTPUT.BUFF.1:
CNT.LOCKED += 1
GOTO NEXT.TRANSACTION:
END
END THEN
NULL
END ELSE
BUFF = "RECORD ": K.TRANSACTIONS: " APPARENTLY DELETED AFTER
SELECT"
GOSUB OUTPUT.BUFF.1:
RELEASE F.TRANSACTIONS, K.TRANSACTIONS
CNT.ABNORMAL += 1
GOTO NEXT.TRANSACTION:
END
Sorry, in my cut'n'paste, I dropped the label "READ.TRANSACTIONS:",
which would be the second line in this code example. (In between the
initialization of ATTEMPTS and the READU).
--
Allen Egerton
aegerton at pobox dot com- Hide quoted text -
- Show quoted text -
It is this kind of un-real understanding of locks that has prevented
me from explaining to anyone why... ah, what's the point. Doomed I
tell yah! Doomed Captain Mainw.. ;-)
But seriously, you should... ah forget it.
.
- Follow-Ups:
- Re: MATREADU/MATWRITE statements timing out
- From: Somebody
- Re: MATREADU/MATWRITE statements timing out
- From: Chandru Murthi
- Re: MATREADU/MATWRITE statements timing out
- References:
- MATREADU/MATWRITE statements timing out
- From: mattydp
- Re: MATREADU/MATWRITE statements timing out
- From: Peter McMurray
- Re: MATREADU/MATWRITE statements timing out
- From: mattydp
- Re: MATREADU/MATWRITE statements timing out
- From: Martin Phillips
- Re: MATREADU/MATWRITE statements timing out
- From: mattydp
- Re: MATREADU/MATWRITE statements timing out
- From: Martin Phillips
- Re: MATREADU/MATWRITE statements timing out
- From: Excalibur
- Re: MATREADU/MATWRITE statements timing out
- From: mattydp
- Re: MATREADU/MATWRITE statements timing out
- From: Allen Egerton
- Re: MATREADU/MATWRITE statements timing out
- From: Allen Egerton
- MATREADU/MATWRITE statements timing out
- Prev by Date: Re: MATREADU/MATWRITE statements timing out
- Next by Date: Re: MATREADU/MATWRITE statements timing out
- Previous by thread: Re: MATREADU/MATWRITE statements timing out
- Next by thread: Re: MATREADU/MATWRITE statements timing out
- Index(es):