× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



>please consider condemning a record lock for over a second or two 
>as an error situation.

In general I agree, but I think 1-2 seconds is a little fast. For online
programs I can't imagine a lock > 1-2 seconds, but for batch programs with
commitment control I could see wait times of > 10 seconds. 

-Walden

------------
Walden H Leverich III
President
Tech Software
(516) 627-3800 x11
(208) 692-3308 eFax
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
 

-----Original Message-----
From: Booth Martin [mailto:Booth@xxxxxxxxxxxx] 
Sent: Monday, September 29, 2003 5:57 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Detecting Record Lock Conditions


please consider condemning a record lock for over a second or two as an
error situation. Find the programs that have an extended lock and repair
them. Do not accept extended record locking as acceptable behavior. If a
record lock is encountered, send a message to yourself and fix the
circumstance that allowed it.
 
 
 
---------------------------------------------------------
Booth Martin http://www.MartinVT.com
Booth@xxxxxxxxxxxx
---------------------------------------------------------
 
-------Original Message-------
 
From: RPG programming on the AS400 / iSeries
Date: Monday, September 29, 2003 16:14:41
To: RPG400-L@xxxxxxxxxxxx
Subject: Detecting Record Lock Conditions
 
I'm trying to have a program detect if a record is locked. If the program
does find that the record it's trying to read is locked, it will wait 10
seconds before retrying to read the same record from the file.
 
Will placing the ITER operation accomplish this task in the code below?
Should it wait 15 seconds then SETLL on the record it was trying to read
then ITER?
 
Is there an easier alternative for checking for locked records?
 
Thanks,
 
Frank
 
 
=================================================
F Customer UF E DISK
 
D RecordLocked C CONST( 01218 )
*
/FREE
 
KeyFld1 = %DEC(Field1:3:0);
KeyFld2 = %DEC(Field2:7:0);
 
// Read CUSTOMER File
SETLL Custkey Customer;
DOU %EOF(Customer);
READ(E) Customer;
 
// Record Locked
IF %ERROR;
 
// Record IS Locked
IF %STATUS = RecordLocked;
*WAIT 15 SECONDS
ITER;
ENDIF;
 
ENDIF;
 
ENDDO;
 
===================================================

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.