|
I don't know about getting the statement number that you want where pgm A has the lock, but I know that you can get the JOB/USER/JOB# Do you think displaying this information to the user would help with them from clicking out of the session? Maybe even pop up a message to them to contact you immediately... Michael Schutte "Bruce Collins" <bruce.collins@aa acooper.com> To Sent by: "RPG programming on the AS400 / rpg400-l-bounces@ iSeries" <rpg400-l@xxxxxxxxxxxx> midrange.com cc Subject 06/07/2006 03:35 RE: Getting Information from a Job PM that has locked a record. Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> Thanks Jerry but I am trying to do a discovery on what is locking a particular program. I have tried to have the users call us if they encounter one but they just click out of the session and I loose my traceability. Bruce "Hoss" Collins IBM Certified Specialist - eServer i5 iSeries System Administrator V5R3 Cisco Certified Network Associate AAA Cooper Transportation Dothan, AL 36303 (334)793-2284 x2434
-----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jerry Adams Sent: Wednesday, June 07, 2006 1:43 PM To: RPG programming on the AS400 / iSeries Subject: Re: Getting Information from a Job that has locked a record. Bruce Collins wrote:1) Program A has a record Lock on record 1 of filea. 2) Program B tries to get a lock on Record 1 of filea but fails. Since Program B failed I want to retrieve what statement number in Program A that caused the Lock Condition so I can track down where I need fix the code to handle locked conditions. Does this make sense? ThanksBruce, This sounds like an on-line maintenance program that has the lock. I surmise that because normally a batch program will vacate the lock
long
before the time-out occurs (though not always). I have users bring up Customer Master records all the time under the maintenance program -
and
then go to lunch (both literally and figuratively). The best solution for that kind of scenario is to: * Retrieve the record without a lock * Store the current ("Before") image of the record o Or just the fields if you update by fields rather than the whole format or record * When the user enters their changes, retrieve the record for
update
* Test to see if the record image (or fields) still matches the original image * If so, update the record / fields * If not, send them a message ("You took too bloody long") and go back to step #1. I had to modify about a dozen major file maintenance programs to accomplish this but, once I did, support calls dropped significantly. * Jerry C. Adams *IBM System i Programmer/Analyst B&W Wholesale Distributors, Inc.* * voice 615.995.7024 fax 615.995.1201 email jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx> -- 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.
-- 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 mailing list archive is Copyright 1997-2025 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.